Length of Keys is not generated by generateChangeLog


if you have a Key over a specific length (which is obligatory sometimes e.g. if you create an index on a text-column) the generateChangeLog-command does not export the length. It might be, that it is not even possible to save the length as a specific attribute because it seems not to be mentioned in the xsd.


CREATE TABLE test (id text,UNIQUE KEY (id(255)));

will generate a changeLog by the generateChangeLog-command like this:


I created https://liquibase.jira.com/browse/CORE-1649 to track the feature, but I will probably not get to it for a while. I generally consider the snapshot/generateChangeLogLogic to be helper logic, not core liquibase logic and so don’t always prioritize handling logic that gets into more complex database-specific functionality. 

Your workarounds should work fine, or you can use the block as well.