addSql('ALTER TABLE task_status DROP CONSTRAINT fk_40a9e1cf166d1f9c'); $this->addSql('DROP INDEX idx_40a9e1cf166d1f9c'); $this->addSql('ALTER TABLE task_status DROP project_id'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE task_status ADD project_id INT NOT NULL'); $this->addSql('ALTER TABLE task_status ADD CONSTRAINT fk_40a9e1cf166d1f9c FOREIGN KEY (project_id) REFERENCES project (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('CREATE INDEX idx_40a9e1cf166d1f9c ON task_status (project_id)'); } }