I’ve run into the following problem, and searching, here, in the archives or in google in general, doesn’t seem to be helping:
I have a table with a column of type DOUBLE, see http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html regarding mysql-isms.
Using liquibase 1.9.3, the latest mysql jdbc connector (5.1.7), against a mysql 5.0.45 server, generateChangeLog is creating the following bit of xml describing a DOUBLE column data type:
Which generates the following DDL when attempting to update:
zoom_coefficient
DOUBLE (22) DEFAULT 0 NOT NULL,
The problem is that MySQL sees that as a syntax error, when attempting a update. I’ve run the query manually via Eclipse:SQL Explorer, and I got the same syntax error, just to make sure it wasn’t something else. MySQL expects no size to be provided along with DOUBLE. This is what should be generated:
zoom_coefficient
DOUBLE DEFAULT 0 NOT NULL,
Running that in Eclipse:SQL Explorer allows the query to execute without issue.
As an aside, Eclipse:SQL Explorer which also uses JDBC, and using the same version and against the same database, reports a size for the column, in the reference database schema, as 22; however, when I ask it to generate the create table statement, it correctly outputs:
zoom_coefficient
DOUBLE DEFAULT 0 NOT NULL,