0
votes

I am working on a project that manages many databases on a handful of servers, and we are using liquibase to keep our database structures current.

As I understand it, liquibase is meant to generate the Databasechangelog and databasechangelogLock tables the first time that it recognizes a Changelog file is executed for a specific database.

The problem is that in one of our environments a couple of the databases seem to try to generate those tables with every run, so that the script that we are getting from liquibase continues to have the initial table creation every time a script is generated. The actual db changes are generated as expected, along with their databasechangelogtable entries, and I can continue generating and running scripts as long as the create table statements for the initial tables is ignored with every run.

This is happening on Databases that work correctly on another server. The majority of the databases on the 'problem' server work correctly as well, so it is only a few of them that are experiencing this problem.

If anyone knows what part of liquibase does the check to decide if the tables need to be generated, or how I can manipulate the run to not try to create them every time it would be very appreciated.

Thanks

1
When you say "a couple of the databases seem to try to generate those tables with every run" what does that mean? What is the state of the databases before the 'run', what command are you running, and what is the state of the databases afterwards?SteveDonie
Thank you for your reply. When I posted this question I did not have a full understanding of how liquibase had been implemented. It turn out that a custom application has been built in Java that generates scripts using liquibase - unfortunately I have not been allowed any more time to work on this problem, and don't have any better understanding at this time. Thank you though, for making me realize that our implementation of Liquibase is fairly far from the beaten path, and will require more investigation by me or my team before I proceed.user2338256

1 Answers

0
votes

Pretty much every Liquibase command checks for the tables and creates them if needed. If you want to know 'which part of Liquibase' is doing this, it is typically the StandardChangeLogHistoryService and the StandardLockService.