migrations/Version20230501140541.php line 1

Open in your IDE?
  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 Version20230501140541 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('ALTER TABLE lot ADD type_moteur_recherche VARCHAR(255) DEFAULT NULL');
  19.         $this->addSql('ALTER TABLE piece_jointe ADD est_image_admin TINYINT(1) DEFAULT NULL');
  20.         $this->addSql('ALTER TABLE programme ADD demande_suppression DATETIME DEFAULT NULL');
  21.         $this->addSql('ALTER TABLE prospect ADD auteur_id INT DEFAULT NULL');
  22.         $this->addSql('ALTER TABLE prospect ADD CONSTRAINT FK_C9CE8C7D60BB6FE6 FOREIGN KEY (auteur_id) REFERENCES utilisateur (id)');
  23.         $this->addSql('CREATE INDEX IDX_C9CE8C7D60BB6FE6 ON prospect (auteur_id)');
  24.         $this->addSql('ALTER TABLE utilisateur CHANGE roles roles JSON NOT NULL');
  25.     }
  26.     public function down(Schema $schema): void
  27.     {
  28.         // this down() migration is auto-generated, please modify it to your needs
  29.         $this->addSql('ALTER TABLE lot DROP type_moteur_recherche');
  30.         $this->addSql('ALTER TABLE piece_jointe DROP est_image_admin');
  31.         $this->addSql('ALTER TABLE programme DROP demande_suppression');
  32.         $this->addSql('ALTER TABLE prospect DROP FOREIGN KEY FK_C9CE8C7D60BB6FE6');
  33.         $this->addSql('DROP INDEX IDX_C9CE8C7D60BB6FE6 ON prospect');
  34.         $this->addSql('ALTER TABLE prospect DROP auteur_id');
  35.         $this->addSql('ALTER TABLE utilisateur CHANGE roles roles LONGTEXT NOT NULL COLLATE `utf8mb4_bin`');
  36.     }
  37. }