class AddIdentityProviderServiceEnum

Public Instance Methods

down() click to toggle source
# File lib/osso/db/migrate/20200714223226_add_identity_provider_service_enum.rb, line 7
  def down
    chnage_column :identity_providers, :service, :text
    execute <<-SQL
      DROP TYPE identity_provider_service;
    SQL
  end
up() click to toggle source
# File lib/osso/db/migrate/20200714223226_add_identity_provider_service_enum.rb, line 2
def up
  execute "CREATE TYPE identity_provider_service AS ENUM ('OKTA', 'AZURE');"
  change_column :identity_providers, :service, 'identity_provider_service USING CAST(service as identity_provider_service)'
end