DEV: Delete unused site settings (#23353)

In a previous commit these site settings were removed from the codebase
because they were identified as unused settings. This commit removes
these settings from the db in case they existed in the site settings
table.

Follow up to: da389d7844
This commit is contained in:
Blake Erickson 2023-08-31 18:19:55 -06:00 committed by GitHub
parent 72f33d1d5d
commit be32f580ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
# frozen_string_literal: true
class DeleteUnusedSiteSettings < ActiveRecord::Migration[7.0]
def up
execute <<~SQL
DELETE
FROM
"site_settings"
WHERE
"name" IN (
'rate_limit_new_user_create_topic',
'enable_system_avatars',
'check_for_new_features',
'allow_user_api_keys'
)
SQL
end
def down
raise ActiveRecord::IrreversibleMigration
end
end