I’ve got a question about the way the MSSQLDatabase is implemented. I was reading along with this post to try and figure out my default-schema-based woes:
http://forum.liquibase.org/topic/ms-sql-server-schema-name-problems
And I don’t understand why Liquibase sets “dbo” as the default schema for MSSQL. If you don’t specify a schema at all, MSSQL will perform the action on your default schema. I have a class overriding MSSQLDatabase, replacing #getDefaultSchemaName, #getLiquibaseSchemaName, and #convertRequestedSchemaToSchema so that they don’t return “dbo” anymore-- and everything works fine.
I can’t set the schema name for this particular problem. It stems from a problem with the Jtds driver – if you have a backslash in your schema name it doesn’t escape the schema name correctly and therefore can’t query the tables correctly – but I’m wondering why this particular decision was made. If I don’t specify anything, and don’t need to specify anything, why is the code doing it? Is this a leftover MSSQL 2000 thing? Would it be appropriate to split the classes so the code knows whether it’s running 2000 or 2005/2008 so this isn’t surprising behavior?