Changed migration for pg compatibility