What's the minimum necessary to support a new database?

Hi.

I’m trying to get Liquibase working with Ingres 10.1.0.  We’re happy to code migrations in SQL rather than Liquibase’s XML.  Given that, what’s involved in writing a minimal Ingres driver?

(I’ve already read https://forum.liquibase.org/topic/coding-support-for-new-database.)

In particular:
1. https://liquibase.jira.com/wiki/display/CONTRIB/Database says that one of the methods that needs to be implemented is createDatabaseSnapshot().  But:

  • UnsupportedDatabase doesn’t implement that, and
  • http://liquibase.org/databases says that "If you attempt to use Liquibase with an unsupported database, it will try to run and will most likely succeed"
Taken together, those two points seem to say that createDatabaseSnapshot() isn’t really necessary after all.  Is that correct?  What does one sacrifice by choosing not to implement that?

2. Is there provision for putting integration tests into an extension, or do they pretty much have to be in the main liquibase-integration-tests project?

3. getViewDefinitionGenerator() returns a SQL query to get view definitions – but just what is the result of that query supposed to look like?

Is there anything I’m missing?

FYI, the problems I’ve run into so far with just using the vanilla Liquibase 2.0.5 are:
  • Ingres uses TIMESTAMP, not DATETIME
  • Ingres lowercases all table names, which keeps liquibase from detecting the presence of DatabaseChangeLog, unless you override it to “databasechangelog” (and similarly for DatabaseChangeLogLock)
  • That NPE because DatabaseFactory doesn’t give the UnsupportedDatabase instance its connection; I’ve cherry-picked the fix from the latest dev. version
  • (There’s some other problem using the dev. version itself; can’t recall the details just now, but for our purposes, I think working around it by using 2.0.5 instead is probably sufficient)

Again, the emphasis here is on minimal.  We want just enough to code migrations in SQL; we don’t have budget for an all-singing-all-dancing implementation.

Thanks much,
  - Eric

We decided not to write a driver, but to keep using UnsupportedDatabase and work around the issues/incompatibilities.


The workarounds necessary to use Liquibase 2.0.6-SNAPSHOT with Ingres 10.1.0 are documented at  http://i-proving.com/2012/08/29/21798/