fix migration error on PostgreSQL