mirror of
https://github.com/discourse/discourse.git
synced 2026-03-03 23:54:20 +08:00
We can use the status of upcoming changes to indicate whether they are experimental or not, having experimental in the setting name is redundant. Migrates the settings and the upcoming change events, updates code, and updates yaml translation keys.
21 lines
520 B
Ruby
21 lines
520 B
Ruby
# frozen_string_literal: true
|
|
|
|
class RenameExperimentalFormTemplatesSetting < ActiveRecord::Migration[8.0]
|
|
def up
|
|
execute <<~SQL
|
|
UPDATE site_settings
|
|
SET name = 'enable_form_templates'
|
|
WHERE name = 'experimental_form_templates'
|
|
SQL
|
|
|
|
execute <<~SQL
|
|
UPDATE upcoming_change_events
|
|
SET upcoming_change_name = 'enable_form_templates'
|
|
WHERE upcoming_change_name = 'experimental_form_templates'
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|