Several identic changelog files (but from different folders) for one database

Hello,

I m new to liquibase, but the problem I faced makes me really confusing.

The situation:

  • We have several developers working with SVN, and 3 databases: 1 development, 1 test and 1 production.
  • So, at one time more than one developer could work with one database (lets say development db), but keep in mind - they have their own workspaces including liquibase changelog files.
  • One developer applies a changeset for the database, and also commits it to svn. Another developer updates with svn his workspace and the status of the changelog file is shown for him that the changeset is not applied - their logfiles are stored in different locations:
    /Users/developer-1/r16.3/db.changelog.xml
    /Users/developer-2/r16.3/db.changelog.xml
  • Liquibase  manual says:
    "Each changeSet contains an �id� tag and an �author� tag. These tags, along with the classpath location and name of the XML file create a unique identifier for that changeSet. "

Question is: how to handle the situation when the same changelog file exists for each developer in his workspace but all they use one database.

Thank you.

use logicalFilePath attribute
as

    http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog" logicalFilePath="oracle.setup.xml"> ...

In this case third coordinate of the change set will be same for every developer and liquibase will not trying repeat execution on the same changesets.

Thank you, taranenko! Worked perfect for me!

Now I m upset - how could not I find this by myself… Really sorry for bothering - the answer was at the same page of manual where I got my question…  :-[

I’m often looking at the dbchangelog xsd which is a semi-documented source because of the well-named tags and attributes.

see http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd for current and http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd for previous version.

Cheer, Oleg