addSql('ALTER TABLE remote_calendar_rule DROP FOREIGN KEY FK_EE93D058C56641EE'); $this->addSql('ALTER TABLE remote_calendar_rule CHANGE remote_calendar_id remote_calendar_id INT NOT NULL'); $this->addSql('ALTER TABLE remote_calendar_rule ADD CONSTRAINT FK_EE93D058C56641EE FOREIGN KEY (remote_calendar_id) REFERENCES remote_calendar (id) ON DELETE CASCADE'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE remote_calendar_rule DROP FOREIGN KEY FK_EE93D058C56641EE'); $this->addSql('ALTER TABLE remote_calendar_rule CHANGE remote_calendar_id remote_calendar_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE remote_calendar_rule ADD CONSTRAINT FK_EE93D058C56641EE FOREIGN KEY (remote_calendar_id) REFERENCES remote_calendar (id)'); } }