|
- <?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 Version20210827103949 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 subthematic_id INT DEFAULT NULL');
- $this->addSql('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004F6C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
- $this->addSql('CREATE INDEX IDX_6A5F004F6C159F58 ON dream (subthematic_id)');
- $this->addSql('ALTER TABLE project_boost ADD subthematic_id INT DEFAULT NULL');
- $this->addSql('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF66C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
- $this->addSql('CREATE INDEX IDX_45312EF66C159F58 ON project_boost (subthematic_id)');
- $this->addSql('ALTER TABLE project_inspiring ADD subthematic_id INT DEFAULT NULL');
- $this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2E6C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (id)');
- $this->addSql('CREATE INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring (subthematic_id)');
- $this->addSql('ALTER TABLE revolt ADD subthematic_id INT DEFAULT NULL');
- $this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_350517876C159F58 FOREIGN KEY (subthematic_id) REFERENCES subthematic (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_6A5F004F6C159F58');
- $this->addSql('DROP INDEX IDX_6A5F004F6C159F58 ON dream');
- $this->addSql('ALTER TABLE dream DROP subthematic_id');
- $this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF66C159F58');
- $this->addSql('DROP INDEX IDX_45312EF66C159F58 ON project_boost');
- $this->addSql('ALTER TABLE project_boost DROP subthematic_id');
- $this->addSql('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2E6C159F58');
- $this->addSql('DROP INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring');
- $this->addSql('ALTER TABLE project_inspiring DROP subthematic_id');
- $this->addSql('ALTER TABLE revolt DROP FOREIGN KEY FK_350517876C159F58');
- $this->addSql('DROP INDEX IDX_350517876C159F58 ON revolt');
- $this->addSql('ALTER TABLE revolt DROP subthematic_id');
- }
- }
|