|
- <?php
-
- declare(strict_types=1);
-
- namespace DoctrineMigrations;
-
- use Doctrine\DBAL\Schema\Schema;
- use Doctrine\Migrations\AbstractMigration;
-
- /**
- * Auto-generated Migration: Please modify to your needs!
- */
- final class Version20211008103800 extends AbstractMigration
- {
- public function getDescription(): string
- {
- return '';
- }
-
- public function up(Schema $schema): void
- {
- // this up() migration is auto-generated, please modify it to your needs
- $this->addSql('ALTER TABLE dream ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
- $this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004F2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
- $this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004F6C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
- $this->addSql('CREATE INDEX IDX_6A5F004F2395FCED ON dream (thematic_id)');
- $this->addSql('CREATE INDEX IDX_6A5F004F6C159F58 ON dream (subthematic_id)');
- $this->addSql('ALTER TABLE project_boost ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
- $this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF62395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
- $this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF66C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
- $this->addSql('CREATE INDEX IDX_45312EF62395FCED ON project_boost (thematic_id)');
- $this->addSql('CREATE INDEX IDX_45312EF66C159F58 ON project_boost (subthematic_id)');
- $this->addSql('ALTER TABLE project_inspiring ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
- $this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2E2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
- $this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2E6C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
- $this->addSql('CREATE INDEX IDX_2E8C2C2E2395FCED ON project_inspiring (thematic_id)');
- $this->addSql('CREATE INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring (subthematic_id)');
- $this->addSql('ALTER TABLE revolt ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
- $this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_350517872395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
- $this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_350517876C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
- $this->addSql('CREATE INDEX IDX_350517872395FCED ON revolt (thematic_id)');
- $this->addSql('CREATE INDEX IDX_350517876C159F58 ON revolt (subthematic_id)');
- }
-
- public function down(Schema $schema): void
- {
- // this down() migration is auto-generated, please modify it to your needs
- $this->addSql('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004F2395FCED');
- $this->addSql('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004F6C159F58');
- $this->addSql('DROP INDEX IDX_6A5F004F2395FCED ON dream');
- $this->addSql('DROP INDEX IDX_6A5F004F6C159F58 ON dream');
- $this->addSql('ALTER TABLE dream DROP thematic_id, DROP subthematic_id, DROP description');
- $this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF62395FCED');
- $this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF66C159F58');
- $this->addSql('DROP INDEX IDX_45312EF62395FCED ON project_boost');
- $this->addSql('DROP INDEX IDX_45312EF66C159F58 ON project_boost');
- $this->addSql('ALTER TABLE project_boost DROP thematic_id, DROP subthematic_id, DROP description');
- $this->addSql('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2E2395FCED');
- $this->addSql('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2E6C159F58');
- $this->addSql('DROP INDEX IDX_2E8C2C2E2395FCED ON project_inspiring');
- $this->addSql('DROP INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring');
- $this->addSql('ALTER TABLE project_inspiring DROP thematic_id, DROP subthematic_id, DROP description');
- $this->addSql('ALTER TABLE revolt DROP FOREIGN KEY FK_350517872395FCED');
- $this->addSql('ALTER TABLE revolt DROP FOREIGN KEY FK_350517876C159F58');
- $this->addSql('DROP INDEX IDX_350517872395FCED ON revolt');
- $this->addSql('DROP INDEX IDX_350517876C159F58 ON revolt');
- $this->addSql('ALTER TABLE revolt DROP thematic_id, DROP subthematic_id, DROP description');
- }
- }
|