|
|
@@ -0,0 +1,97 @@ |
|
|
|
<?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 Version20211007131528 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 DROP FOREIGN KEY FK_6A5F004F2395FCED'); |
|
|
|
$this->addSql('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004F6C159F58'); |
|
|
|
$this->addSql('ALTER TABLE dream DROP FOREIGN KEY FK_6A5F004FE2920B1'); |
|
|
|
$this->addSql('DROP INDEX IDX_6A5F004F6C159F58 ON dream'); |
|
|
|
$this->addSql('DROP INDEX IDX_6A5F004FE2920B1 ON dream'); |
|
|
|
$this->addSql('DROP INDEX IDX_6A5F004F2395FCED ON dream'); |
|
|
|
$this->addSql('ALTER TABLE dream DROP individual_data_id, DROP thematic_id, DROP subthematic_id, DROP description'); |
|
|
|
$this->addSql('ALTER TABLE individual_data DROP firstname, DROP lastname, DROP email, DROP intro_question, DROP intro_answer'); |
|
|
|
$this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF62395FCED'); |
|
|
|
$this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF66C159F58'); |
|
|
|
$this->addSql('ALTER TABLE project_boost DROP FOREIGN KEY FK_45312EF6E2920B1'); |
|
|
|
$this->addSql('DROP INDEX IDX_45312EF66C159F58 ON project_boost'); |
|
|
|
$this->addSql('DROP INDEX IDX_45312EF6E2920B1 ON project_boost'); |
|
|
|
$this->addSql('DROP INDEX IDX_45312EF62395FCED ON project_boost'); |
|
|
|
$this->addSql('ALTER TABLE project_boost DROP individual_data_id, 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('ALTER TABLE project_inspiring DROP FOREIGN KEY FK_2E8C2C2EE2920B1'); |
|
|
|
$this->addSql('DROP INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring'); |
|
|
|
$this->addSql('DROP INDEX IDX_2E8C2C2EE2920B1 ON project_inspiring'); |
|
|
|
$this->addSql('DROP INDEX IDX_2E8C2C2E2395FCED ON project_inspiring'); |
|
|
|
$this->addSql('ALTER TABLE project_inspiring DROP individual_data_id, 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('ALTER TABLE revolt DROP FOREIGN KEY FK_35051787E2920B1'); |
|
|
|
$this->addSql('DROP INDEX IDX_350517876C159F58 ON revolt'); |
|
|
|
$this->addSql('DROP INDEX IDX_35051787E2920B1 ON revolt'); |
|
|
|
$this->addSql('DROP INDEX IDX_350517872395FCED ON revolt'); |
|
|
|
$this->addSql('ALTER TABLE revolt DROP individual_data_id, DROP thematic_id, DROP subthematic_id, DROP description'); |
|
|
|
$this->addSql('ALTER TABLE subthematic DROP FOREIGN KEY FK_778C62FB2395FCED'); |
|
|
|
$this->addSql('DROP INDEX IDX_778C62FB2395FCED ON subthematic'); |
|
|
|
$this->addSql('ALTER TABLE subthematic DROP thematic_id, DROP name'); |
|
|
|
$this->addSql('ALTER TABLE territory DROP name'); |
|
|
|
$this->addSql('ALTER TABLE thematic DROP name'); |
|
|
|
} |
|
|
|
|
|
|
|
public function down(Schema $schema): void |
|
|
|
{ |
|
|
|
// this down() migration is auto-generated, please modify it to your needs |
|
|
|
$this->addSql('ALTER TABLE dream ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`'); |
|
|
|
$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('ALTER TABLE dream ADD CONSTRAINT FK_6A5F004FE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_6A5F004F6C159F58 ON dream (subthematic_id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_6A5F004FE2920B1 ON dream (individual_data_id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_6A5F004F2395FCED ON dream (thematic_id)'); |
|
|
|
$this->addSql('ALTER TABLE individual_data ADD firstname VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD lastname VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD email VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD intro_question VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD intro_answer VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`'); |
|
|
|
$this->addSql('ALTER TABLE project_boost ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`'); |
|
|
|
$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('ALTER TABLE project_boost ADD CONSTRAINT FK_45312EF6E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_45312EF66C159F58 ON project_boost (subthematic_id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_45312EF6E2920B1 ON project_boost (individual_data_id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_45312EF62395FCED ON project_boost (thematic_id)'); |
|
|
|
$this->addSql('ALTER TABLE project_inspiring ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`'); |
|
|
|
$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('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2EE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_2E8C2C2E6C159F58 ON project_inspiring (subthematic_id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_2E8C2C2EE2920B1 ON project_inspiring (individual_data_id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_2E8C2C2E2395FCED ON project_inspiring (thematic_id)'); |
|
|
|
$this->addSql('ALTER TABLE revolt ADD individual_data_id INT DEFAULT NULL, ADD thematic_id INT DEFAULT NULL, ADD subthematic_id INT DEFAULT NULL, ADD description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`'); |
|
|
|
$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('ALTER TABLE revolt ADD CONSTRAINT FK_35051787E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_350517876C159F58 ON revolt (subthematic_id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_35051787E2920B1 ON revolt (individual_data_id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_350517872395FCED ON revolt (thematic_id)'); |
|
|
|
$this->addSql('ALTER TABLE subthematic ADD thematic_id INT DEFAULT NULL, ADD name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`'); |
|
|
|
$this->addSql('ALTER TABLE subthematic ADD CONSTRAINT FK_778C62FB2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)'); |
|
|
|
$this->addSql('CREATE INDEX IDX_778C62FB2395FCED ON subthematic (thematic_id)'); |
|
|
|
$this->addSql('ALTER TABLE territory ADD name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`'); |
|
|
|
$this->addSql('ALTER TABLE thematic ADD name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`'); |
|
|
|
} |
|
|
|
} |