migrations/Version20250605092300.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 Version20250605092300 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql(<<<'SQL'
  19.             CREATE TABLE pre_consultation_message (id INT AUTO_INCREMENT NOT NULL, client_id INT UNSIGNED DEFAULT NULL, user_pseudo_id INT DEFAULT NULL, photos JSON DEFAULT NULL, subject VARCHAR(255) NOT NULL, message LONGTEXT NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_E9483D3819EB6921 (client_id), INDEX IDX_E9483D3820031926 (user_pseudo_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
  20.         SQL);
  21.         $this->addSql(<<<'SQL'
  22.             ALTER TABLE pre_consultation_message ADD CONSTRAINT FK_E9483D3819EB6921 FOREIGN KEY (client_id) REFERENCES client (id_client)
  23.         SQL);
  24.         $this->addSql(<<<'SQL'
  25.             ALTER TABLE pre_consultation_message ADD CONSTRAINT FK_E9483D3820031926 FOREIGN KEY (user_pseudo_id) REFERENCES user_pseudo (user_pseudo_id)
  26.         SQL);
  27.     }
  28.     public function down(Schema $schema): void
  29.     {
  30.         // this down() migration is auto-generated, please modify it to your needs
  31.     
  32.     }
  33. }