Command line doesn't check dbchangelog table for entries?

I have liquibase running fine using Spring on my application in DEV environment. Now I wanted to run liquibase using command line so that i can have tables ready before i deploy the WAR file in production environment.

But in DEV when i use command line update command it doesn’t even check the DBCHANGELOG table whether entries already exists, it tries to run the changeset again when they have already been created. Is there anyway to force liquibase to check the tables when command line is used?

Any help on this is appreciated.

The command line should be checkign the databasechangelog table just the same as your spring version. Are you using a different connection or default schema settings between the two that would make them be looking for a different DATATABASECHANGELOG table?

Nathan

So it sounds like the problem is that the command line and spring have different paths for the changesets. Liquibase uses the path to the changelog file as part of the identifier. If you select * from databasechangelog you will see what spring had been storing and make sure the command prompt approach is using the same looking path to the changelog.


Otherwise, you can add the logicalFilePath attribute to the changeLog files based on what is currently in the database to force it to be the same regardless of how the file is referenced when ran.


Nathan

Sorry it was my bad…

I had not mentioned the hierarchy of the changelog.xml as same as it is in the changelog table. Hence it was considering it as a new changelog.

Thanks