addSql('CREATE TABLE project_inspiring (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_2E8C2C2EE2920B1 (individual_data_id), INDEX IDX_2E8C2C2ED9275BF1 (collectif_data_id), INDEX IDX_2E8C2C2E2395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2EE2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)'); $this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2ED9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)'); $this->addSql('ALTER TABLE project_inspiring ADD CONSTRAINT FK_2E8C2C2E2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)'); $this->addSql('DROP TABLE projects_inspiring'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('CREATE TABLE projects_inspiring (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_E60CAEC6E2920B1 (individual_data_id), INDEX IDX_E60CAEC6D9275BF1 (collectif_data_id), INDEX IDX_E60CAEC62395FCED (thematic_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' '); $this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC62395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)'); $this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC6D9275BF1 FOREIGN KEY (collectif_data_id) REFERENCES collectif_data (id)'); $this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC6E2920B1 FOREIGN KEY (individual_data_id) REFERENCES individual_data (id)'); $this->addSql('DROP TABLE project_inspiring'); } }