Fix wrong migrations

For Postgres migrations are failed.
More then we can get for mysql an error
"Specified key was too long; max key length is 1000 bytes" in b6ae66d05e3
migration in some versions of dialect.

Fixes-Bug: #1219776

Change-Id: Id9b0e1eb0e685053291367f7eb62fef68b6b2f84
Merge "Fix wrong migrations"