|
123456789101112131415161718192021222324252627282930313233343536373839 |
- <?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 Version20210824144602 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('CREATE TABLE revolt (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT NOT NULL, INDEX IDX_35051787E2920B1 (individual_data_id), INDEX IDX_35051787D9275BF1 (collectif_data_id), INDEX IDX_350517872395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_35051787E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
- $this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_35051787D9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
- $this->addSql('ALTER TABLE revolt ADD CONSTRAINT FK_350517872395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
- $this->addSql('DROP TABLE revolts');
- }
-
- public function down(Schema $schema): void
- {
- // this down() migration is auto-generated, please modify it to your needs
- $this->addSql('CREATE TABLE revolts (id INT AUTO_INCREMENT NOT NULL, individual_data_id INT DEFAULT NULL, collectif_data_id INT DEFAULT NULL, thematic_id INT DEFAULT NULL, description LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_68E7DC9FE2920B1 (individual_data_id), INDEX IDX_68E7DC9FD9275BF1 (collectif_data_id), INDEX IDX_68E7DC9F2395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
- $this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9F2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
- $this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9FD9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)');
- $this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9FE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)');
- $this->addSql('DROP TABLE revolt');
- }
- }
|