[#8370445] change migrations for PostgreSQL compatibility

!WARNING!
migrations have been sumarized into one create_table statement to avoid problem in PostgreSQL. Final schema.rb is not altered