-- Place your SQL code here ALTER TABLE vn2008.albaran ADD IF NOT EXISTS farmingFk int(10) unsigned NULL; ALTER TABLE vn2008.albaran DROP FOREIGN KEY IF EXISTS albaran_FK; ALTER TABLE vn2008.albaran ADD CONSTRAINT albaran_FK FOREIGN KEY (farmingFk) REFERENCES vn.farming(id);