DB-specific conditional column types

Is there a way to conditionally specify column types in Liquibase while creating a table? For example –

  1. enum for MySQL, as per this: http://dev.mysql.com/doc/refman/5.0/en/enum.html
  2. column with check constraints for Oracle to enforce enum-like behaviour
  3. simply char(1) for all other DBs

Regards,
Shantanu

Yes, there are a few ways.  There is modifySql, changelog parameters, and custom SqlGenerator (http://liquibase.org/extension) classes you can write. 

With changelog params, you would define your changeSet like and at the top of the changeLog you can a tag for each database.  That may be the easiest approach and should work for you.

Nathan