I’m a blocking issue on Sybase ASE12.5 (with JTDS driver) using Liquibase version 2.0.1. The first time I run Liquibase on my DB, it works fine and creates the DATABASECHANGELOG and DATABASECHANGELOGLOCK tables properly. The second time I run it, Liquibase attempts to re-create the lock table, thus failing with the below error:
liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE [DATABASECHANGELOGLOCK] ([ID] INT NOT NULL, [LOCKED] BIT NOT NULL, [LOCKGRANTED] D
ATETIME NULL, [LOCKEDBY] VARCHAR(255) NULL, CONSTRAINT [PK_DATABASECHANGELOGLOCK] PRIMARY KEY ([ID])); on  INSERT INTO [DATABASECHANGELOGLOCK] ([ID], [LOCKED]) VALUES (1, 0): There is already an object named ‘DATABASECHANGELOGLOCK’ in the database.
This resembles a lot a smilar issue on MS SQL http://forum.liquibase.org/topic/databasechangeloglock-is-created-twice-on-case-sensitive-ms-sql-database which is supposed to be fixed in 2.0.1.
Has anyone faced this issue? Is there any workaround?
In case anyone has faced this issue, after some investigation, I found a workaround which consists of passing the
defaultSchemaName property. Pass here not the name of the schema, but the name of the user role associated with your schema (a list of these is found in the table sysusers).
Glad you found a work-around. I created an issue: http://liquibase.jira.com/browse/CORE-911