From be32f580ad0e316ea0397d0662145a06ed449c39 Mon Sep 17 00:00:00 2001 From: Blake Erickson <o.blakeerickson@gmail.com> Date: Thu, 31 Aug 2023 18:19:55 -0600 Subject: [PATCH] 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: da389d7844f8895ea3531c61996a988e4d7b70e5 --- ...30831153649_delete_unused_site_settings.rb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 db/migrate/20230831153649_delete_unused_site_settings.rb diff --git a/db/migrate/20230831153649_delete_unused_site_settings.rb b/db/migrate/20230831153649_delete_unused_site_settings.rb new file mode 100644 index 00000000000..232a47e4c7a --- /dev/null +++ b/db/migrate/20230831153649_delete_unused_site_settings.rb @@ -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