2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-03-03 23:54:20 +08:00
discourse/db/migrate/20260206000938_rename_experimental_form_templates_setting.rb
Martin Brennan 6e8570b0fb
DEV: Rename experimental_ upcoming change settings (#37589)
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.
2026-02-10 10:34:37 +10:00

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