You probably want the activerecord-postgres_enum
gem, because it adds some good stuff for your migrations and allows you to keep using the schema.rb
(instead of switching to a schema.sql
:
gem 'activerecord-postgres_enum'
Your migration would then look like this:
class AddCountryToCities < ActiveRecord::Migration[5.2]