abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE `service_port` DROP FOREIGN KEY `FK_8DD2E92069FFAD89`; ALTER TABLE `service_port` ADD CONSTRAINT `FK_8DD2E92069FFAD89` FOREIGN KEY (`olt_id`) REFERENCES `olt`(`id`) ON DELETE SET NULL ON UPDATE RESTRICT; ALTER TABLE `service_port` DROP FOREIGN KEY `FK_8DD2E920AB83998C`; ALTER TABLE `service_port` ADD CONSTRAINT `FK_8DD2E920AB83998C` FOREIGN KEY (`onu_id`) REFERENCES `onu`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT; '); } /** * @param Schema $schema */ public function down(Schema $schema) { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); } }