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