discourse/db/migrate/20141014191645_fix_tos_name.rb
Robin Ward 810a069cfd FIX: Couldn't migrate database from nothing due to I18n
Since I18n has a DB backend now, I've introduced a helper we can use to
skip overrides in certain situations. Otherwise migration from empty
databases was broken.
2015-11-14 16:12:09 -05:00

8 lines
288 B
Ruby

class FixTosName < ActiveRecord::Migration
def up
I18n.backend.overrides_disabled do
execute ActiveRecord::Base.sql_fragment('UPDATE user_fields SET name = ? WHERE name = ?', I18n.t('terms_of_service.title'), I18n.t("terms_of_service.signup_form_message"))
end
end
end