I’ve currently using Liquibase to first do a diffChangeLog, validate, and then update the live developmental database. I noticed that the update failed when trying to update a constraint on a column. The problem is that the constraint is trying to be added despite the column not existing in the first place. In fact, the column is created after the constraint is.
Is this a bug in Liquibase? If not, how can I fix this issue?
I’ve pasted the file contains as follows:
-- liquibase formatted sql -- changeset liquibase:1617859768566-3 ALTER TABLE Task ADD CONSTRAINT FK__Task__projectID__3C69FB99 FOREIGN KEY (projectID) REFERENCES Projects (ID) ON UPDATE NO ACTION ON DELETE CASCADE; -- changeset liquibase:1617859768566-4 ALTER TABLE Task ADD projectID bigint NOT NULL; -- changeset liquibase:1617859768566-1 ALTER TABLE Task DROP CONSTRAINT FK__Task__orgID__3D5E1FD2; -- changeset liquibase:1617859768566-2 ALTER TABLE Task ADD CONSTRAINT FK__Task__orgID__3D5E1FD2 FOREIGN KEY (orgID) REFERENCES Organizations (ID) ON UPDATE NO ACTION ON DELETE NO ACTION;