migrations/Version20221206134855.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 Version20221206134855 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('DROP TABLE migration_versions');
  19. //        $this->addSql('ALTER TABLE classification__category DROP FOREIGN KEY FK_43629B36EA9FDD75');
  20. //        $this->addSql('DROP INDEX IDX_43629B36EA9FDD75 ON classification__category');
  21.         $this->addSql('ALTER TABLE classification__category CHANGE newsletterFrom newslettersFrom VARCHAR(255) DEFAULT NULL');
  22.         $this->addSql('UPDATE `media__media` SET `cdn_is_flushable` = 0 where `cdn_is_flushable` is NULL');
  23. //        $this->addSql('ALTER TABLE classification__collection DROP FOREIGN KEY FK_A406B56AEA9FDD75');
  24. //        $this->addSql('DROP INDEX IDX_A406B56AEA9FDD75 ON classification__collection');
  25. //        $this->addSql('ALTER TABLE classification__collection DROP media_id, CHANGE context context INT DEFAULT NULL');
  26. //        $this->addSql('ALTER TABLE classification__context CHANGE id id INT AUTO_INCREMENT NOT NULL');
  27. //        $this->addSql('ALTER TABLE classification__tag CHANGE context context INT DEFAULT NULL');
  28.     }
  29.     public function down(Schema $schema): void
  30.     {
  31.         // this down() migration is auto-generated, please modify it to your needs
  32. //        $this->addSql('CREATE TABLE migration_versions (version VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`, PRIMARY KEY(version)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  33.         $this->addSql('ALTER TABLE classification__category CHANGE newslettersFrom newsletterFrom VARCHAR(255) DEFAULT NULL');
  34.         $this->addSql('UPDATE `media__media` SET `cdn_is_flushable` = NULL where `cdn_is_flushable` = 0');
  35. //        $this->addSql('ALTER TABLE classification__category ADD CONSTRAINT FK_43629B36EA9FDD75 FOREIGN KEY (media_id) REFERENCES media__media (id) ON DELETE SET NULL');
  36. //        $this->addSql('CREATE INDEX IDX_43629B36EA9FDD75 ON classification__category (media_id)');
  37. //        $this->addSql('ALTER TABLE classification__collection ADD media_id INT DEFAULT NULL, CHANGE context context VARCHAR(255) DEFAULT NULL');
  38. //        $this->addSql('ALTER TABLE classification__collection ADD CONSTRAINT FK_A406B56AEA9FDD75 FOREIGN KEY (media_id) REFERENCES media__media (id) ON DELETE SET NULL');
  39. //        $this->addSql('CREATE INDEX IDX_A406B56AEA9FDD75 ON classification__collection (media_id)');
  40. //        $this->addSql('ALTER TABLE classification__context CHANGE id id VARCHAR(255) NOT NULL');
  41. //        $this->addSql('ALTER TABLE classification__tag CHANGE context context VARCHAR(255) DEFAULT NULL');
  42.     }
  43. }