fixed migration to be compatible with posgresql

Change-Id: I247df4c0f378d88141c6b741b3ae40832f1e17aa