migrations/Version20240530002945.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 Version20240530002945 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $companySql = <<<SQL
  18. CREATE TABLE assistant_thread
  19. (
  20.     id          INT AUTO_INCREMENT NOT NULL,
  21.     template_id INT                NOT NULL,
  22.     session_id  varchar(255),
  23.     data        JSON               NOT NULL,
  24.     PRIMARY KEY (id),
  25.     INDEX (session_id),
  26.     FOREIGN KEY (template_id) REFERENCES template (id)
  27. ) DEFAULT CHARACTER SET utf8mb4
  28.   COLLATE `utf8mb4_unicode_ci`
  29.   ENGINE = InnoDB
  30. SQL;
  31.         $this->addSql($companySql);
  32.     }
  33.     public function down(Schema $schema): void
  34.     {
  35.         // this down() migration is auto-generated, please modify it to your needs
  36.     }
  37. }