Create a database table in MySQL that contains an enum column (or use
Use generateChangeLog to capture the table
Delete the table
Run 'update' with the change log generated in Step 2
The 'update' fails. Error details can be found in
If you look at
there are 2 problems that keep the changeset from running successfully:
The type attribute contains size information instead of enum values
The defaultValue attribute is not appropriately quoted
If you manually update the xml to correct these 2 issues (example:
) it can be used with Liquibase to create the table.
NOTE: Even with the manually updated file, the enum isn't created appropriately. Only the first two possible entries specified by type="ENUM('one','two','three')" are included in the enum in the database.
So while you are going for this:
You end up with this:
Windows 7 w/ MySQL 5.5
CentOS 5 w/ MySQL 5
Enum support is currently not in liquibase directly. Possibly in the liquibase-mysql extension
Is there a mysql extension under development currently or is it planned? I can't find it in the available code base, but I may be overlooking it.
I thought there was one already, but apparently it's just planned....
I'll probably try to create it during the 3.0 RC process to prove out the new diff/snapshot extensions