mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 22:36:18 +08:00
f3aab19829
This commit promotes all post_deploy migrations which existed in Discourse v2.7.13 (timestamp <= 20210328233843) This reduces the likelihood of issues relating to migration run order Also fixes a couple of typos in `script/promote_migrations`
36 lines
974 B
Ruby
36 lines
974 B
Ruby
# frozen_string_literal: true
|
|
|
|
class DropOldSsoSiteSettings < ActiveRecord::Migration[6.0]
|
|
def up
|
|
# These were copied to their new names in migrate/20210204135429_rename_sso_site_settings
|
|
execute <<~SQL
|
|
DELETE FROM site_settings
|
|
WHERE name IN (
|
|
'enable_sso',
|
|
'sso_allows_all_return_paths',
|
|
'enable_sso_provider',
|
|
'verbose_sso_logging',
|
|
'sso_url',
|
|
'sso_secret',
|
|
'sso_provider_secrets',
|
|
'sso_overrides_groups',
|
|
'sso_overrides_bio',
|
|
'sso_overrides_email',
|
|
'sso_overrides_username',
|
|
'sso_overrides_name',
|
|
'sso_overrides_avatar',
|
|
'sso_overrides_profile_background',
|
|
'sso_overrides_location',
|
|
'sso_overrides_website',
|
|
'sso_overrides_card_background',
|
|
'external_auth_skip_create_confirm',
|
|
'external_auth_immediately'
|
|
)
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|