Duplicate identifiers but not...

Hello,

 

Im using liquibase-maven-plugin 2.0.1 and seeing odd behavior.

 

Ive built a schema ground up using liquibase (works great) and am now going about adding an update capabilty. So theres an existing DATABASECHANGELOG table.  Ive created a master ‘update’ changelog that through a series of includes, gets down to reference specific changesets that include the updates.

 

Ive got an update to a package/package body. Previously on the install of this schema, I created said package with a couple of includes, say A.xml (package) and B.xml (package body). A.xml and B.xml are both defined with:

 

 

 and were created properly in a master ‘install’ changelog using includes like so:

 

 

DATABASECHANGELOG reflects the unique id, auther and filename combo as expected.

 

Now when I alter A.xml and B.xml and include them as part of the master ‘update’ changelog, with includes identical to the above, like so:

 

 

I get the following error:

 

[INFO] Error setting up or running Liquibase: Validation Failed:
     2 change sets had duplicate identifiers
          changelogs/replaceable/proc/A.xml::1::chodges
          changelogs/replaceable/proc/B.xml::1::chodges

 

This doesnt make any sense to me. Not sure what Im missing. Thoughts or suggestions?

 

That should work just fine. The duplicate id error you are seeing is from liquibase seeing duplicate id/author/filenames at changelog parse time. Liquibase does not do any “file A is already included, do not include it again” checking, so make sure it is only referenced one time in your tree of changelog fiels.


The runOnChange should work the way you are wanting it to.


Nathan

Glad you found it


Nathan

Anyone? This seems fundamental. Can anyone comment on whether or not this should work from their experience? i.e. have runOnChange=‘true’ for a replaceable package, modify file, reference file in changeset?

Doh! Sure enough was elsewhere in tree of changelogs. Much thanks!