addSql('ALTER TABLE ag_main_vote ADD main_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE ag_main_vote ADD CONSTRAINT FK_A5781BDE627EA78A FOREIGN KEY (main_id) REFERENCES ag_main (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('CREATE INDEX IDX_A5781BDE627EA78A ON ag_main_vote (main_id)'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('CREATE SCHEMA public'); $this->addSql('ALTER TABLE ag_main_vote DROP CONSTRAINT FK_A5781BDE627EA78A'); $this->addSql('DROP INDEX IDX_A5781BDE627EA78A'); $this->addSql('ALTER TABLE ag_main_vote DROP main_id'); } }