Did you try:
…or something else? I would expect the top one to work–was that how you had it?
Did you try:
I’m new to liquibase, and am getting started with version 2.0.1. Right off the bat I’ve run into a problem with this tool running against MySQL. I did a generateChangeLog, and then ran an update against a clean database - very basic functionality, and liquibase failed with this error:
Caused By: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(7,4) DEFAULT 0 NOT NULL,
debug BIT DEFAULT 0 NOT NULL,
is_active TINYINT UN’ at line 1
It looks like the culprit is that this table has a DECIMAL column and liquibase is generating “0” for the default value instead of “0.0000”. I googled and found a thread going back to 2009 where this was supposedly fixed in version 1.9.5 or 2.0.
Does anybody know what’s up with this? Was the fix never applied, or never properly tested? Is there a workaround?
The changelog has this:
I believe the problem is actually in the ordering of the UNSIGNED attribute, not the default value as I thought earlier.
This is with MySQL 5.5.9 running on OS X 10.6, in case that makes a difference.
I patched the changelog for this column to this:
And now it works. So at least I have a workaround. However, the changelog generated from the existing schema was wrong, so this should get fixed. I filed bug CORE-895 to track this problem.