discourse/db/migrate/20230913194832_rename_revoke_api_keys_settings.rb
Renato Atilio d93c2cb3d2
FEATURE: site settings to revoke api keys older than a number of days (#23595)
* FEATURE: site settings to revoke api keys older than a number of days
2023-09-15 16:31:29 -03:00

14 lines
602 B
Ruby

# frozen_string_literal: true
#
class RenameRevokeApiKeysSettings < ActiveRecord::Migration[7.0]
def up
execute "UPDATE site_settings SET name = 'revoke_api_keys_unused_days' where name = 'revoke_api_keys_days'"
execute "UPDATE site_settings SET name = 'revoke_user_api_keys_unused_days' where name = 'expire_user_api_keys_days'"
end
def down
execute "UPDATE site_settings SET name = 'revoke_api_keys_days' where name = 'revoke_api_keys_unused_days'"
execute "UPDATE site_settings SET name = 'expire_user_api_keys_days' where name = 'revoke_user_api_keys_unused_days'"
end
end