Liquibase® version 3.8.5 is now available! Get it for free.
2018 XML Announcement
News All Previous Posts >>

Subscribe for email updates

- and/or -

DATABASECHANGELOGLOCK table

Liquibase uses the DATABASECHANGELOGLOCK table ensure only one instance of Liquibase is running at one time.

Because Liquibase simply reads from the DATABASECHANGELOG table to determine which changeSets need to run, if multiple instances of Liquibase are executed against the same database concurrently you will get conflicts. This can happen if multiple developers use the same database instance or if there are multiple servers in a cluster which auto-run Liquibase on startup.

ColumnStandard Data TypeDescription
IDINTId of the lock. Currently there is only one lock, but is available for future use
LOCKEDINTSet to "1" if the Liquibase is running against this database. Otherwise set to "0"
LOCKGRANTEDDATETIMEDate and time that the lock was granted
LOCKEDBYVARCHAR(255)Human-readable description of who the lock was granted to.

Notes

If Liquibase does not exit cleanly, the lock row may be left as locked. You can clear out the current lock by running liquibase releaseLocks which runs UPDATE DATABASECHANGELOGLOCK SET LOCKED=0