addSql('ALTER TABLE bovine ADD building_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE bovine ADD CONSTRAINT FK_2068337F4D2A7E12 FOREIGN KEY (building_id) REFERENCES building (id)'); $this->addSql('CREATE INDEX IDX_2068337F4D2A7E12 ON bovine (building_id)'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE bovine DROP CONSTRAINT FK_2068337F4D2A7E12'); $this->addSql('DROP INDEX IDX_2068337F4D2A7E12'); $this->addSql('ALTER TABLE bovine DROP building_id'); } }