migrations/Version20240613171937.php line 1

  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20240613171937 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $drop = <<<SQL
  18.     ALTER TABLE assistant DROP COLUMN local_vector_database_id;  
  19.     ALTER TABLE assistant DROP COLUMN local_vector_database_data_url;
  20. SQL;
  21.         $this->addSql($drop);
  22.         $sql = <<<SQL
  23. create table assistant_database
  24. (
  25.     id              int auto_increment primary key,
  26.     assistant_id     int                                                                                 not null,
  27.     type            varchar(20)                                                                         not null,
  28.     initialized     int                                                       default 0                 null,
  29.     parameter       varchar(255)                                                                        null,
  30.     data_url        varchar(255)                                                                        null,
  31.     reinitialize    datetime                                                  default CURRENT_TIMESTAMP null,
  32.     active          tinyint                                                   default 1                 null,
  33.     constraint assistant_database_fk_1
  34.         foreign key (assistant_id) references assistant (id)
  35. )
  36.     collate = utf8mb4_unicode_ci;
  37. create index assistant_id
  38.     on assistant_database (assistant_id);
  39. SQL;
  40.         $this->addSql($sql);
  41.     }
  42.     public function down(Schema $schema): void
  43.     {
  44.         // this down() migration is auto-generated, please modify it to your needs
  45.     }
  46. }