class CreateUserRoles < ActiveRecord::Migration[7.1]
  def up
    create_enum :user_roles, %w[user admin]
  end

  def down
    # While there is a `create_enum` method, there is no way to drop it. You can
    # how ever, use raw SQL to drop the enum type.
    execute <<-SQL
      DROP TYPE user_roles;
    SQL
  end
end
