migrations/Version20220828140520.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20220828140520 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 grouped_synthesis (id INT NOT NULL, PRIMARY KEY(id))');$this->addSql('CREATE TABLE grouped_synthesis_grouping (grouped_synthesis_id INT NOT NULL, grouping_id INT NOT NULL, PRIMARY KEY(grouped_synthesis_id, grouping_id))');$this->addSql('CREATE INDEX IDX_9A787315CE51B623 ON grouped_synthesis_grouping (grouped_synthesis_id)');$this->addSql('CREATE INDEX IDX_9A7873155DDE227E ON grouped_synthesis_grouping (grouping_id)');$this->addSql('CREATE TABLE grouping (id INT NOT NULL, synthesis_id INT DEFAULT NULL, key VARCHAR(128) NOT NULL, index INT NOT NULL, PRIMARY KEY(id))');$this->addSql('CREATE INDEX IDX_8FA8718EC91FE48 ON grouping (synthesis_id)');$this->addSql('CREATE TABLE grouping_primitive (grouping_id INT NOT NULL, primitive_id INT NOT NULL, PRIMARY KEY(grouping_id, primitive_id))');$this->addSql('CREATE INDEX IDX_7CA86B95DDE227E ON grouping_primitive (grouping_id)');$this->addSql('CREATE INDEX IDX_7CA86B9621DFAA6 ON grouping_primitive (primitive_id)');$this->addSql('ALTER TABLE grouped_synthesis ADD CONSTRAINT FK_A706582FBF396750 FOREIGN KEY (id) REFERENCES primitive (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');$this->addSql('ALTER TABLE grouped_synthesis_grouping ADD CONSTRAINT FK_9A787315CE51B623 FOREIGN KEY (grouped_synthesis_id) REFERENCES grouped_synthesis (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');$this->addSql('ALTER TABLE grouped_synthesis_grouping ADD CONSTRAINT FK_9A7873155DDE227E FOREIGN KEY (grouping_id) REFERENCES grouping (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');$this->addSql('ALTER TABLE grouping ADD CONSTRAINT FK_8FA8718EC91FE48 FOREIGN KEY (synthesis_id) REFERENCES synthesis (id) NOT DEFERRABLE INITIALLY IMMEDIATE');$this->addSql('ALTER TABLE grouping ADD CONSTRAINT FK_8FA8718BF396750 FOREIGN KEY (id) REFERENCES primitive (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');$this->addSql('ALTER TABLE grouping_primitive ADD CONSTRAINT FK_7CA86B95DDE227E FOREIGN KEY (grouping_id) REFERENCES grouping (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');$this->addSql('ALTER TABLE grouping_primitive ADD CONSTRAINT FK_7CA86B9621DFAA6 FOREIGN KEY (primitive_id) REFERENCES primitive (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');}public function down(Schema $schema): void{// this down() migration is auto-generated, please modify it to your needs$this->addSql('ALTER TABLE grouped_synthesis_grouping DROP CONSTRAINT FK_9A787315CE51B623');$this->addSql('ALTER TABLE grouped_synthesis_grouping DROP CONSTRAINT FK_9A7873155DDE227E');$this->addSql('ALTER TABLE grouping_primitive DROP CONSTRAINT FK_7CA86B95DDE227E');$this->addSql('DROP TABLE grouped_synthesis');$this->addSql('DROP TABLE grouped_synthesis_grouping');$this->addSql('DROP TABLE grouping');$this->addSql('DROP TABLE grouping_primitive');}}