Sha256: 2ee2e7201f5290f6efe25d9368804d92476a1689089239d989793f3f0264251d
Contents?: true
Size: 906 Bytes
Versions: 7
Compression:
Stored size: 906 Bytes
Contents
class AddSalesforceToProviderServiceEnum < ActiveRecord::Migration[6.0] disable_ddl_transaction! def up execute <<-SQL ALTER TYPE identity_provider_service ADD VALUE 'SALESFORCE'; SQL end def down execute <<~SQL CREATE TYPE identity_provider_service_new AS ENUM ('AZURE', 'OKTA', 'ONELOGIN', 'GOOGLE', 'PING'); -- Remove values that won't be compatible with new definition DELETE FROM identity_providers WHERE service = 'SALESFORCE'; -- Convert to new type, casting via text representation ALTER TABLE identity_providers ALTER COLUMN service TYPE identity_provider_service_new USING (service::text::identity_provider_service_new); -- and swap the types DROP TYPE identity_provider_service; ALTER TYPE identity_provider_service_new RENAME TO identity_provider_service; SQL end end
Version data entries
7 entries across 7 versions & 1 rubygems