agenda-libre-ruby/db/migrate/20161031215120_migrate_i18n_to_high_voltage.rb
echarp 2fae5c09a4 Migration to the gem high_voltage: « Easily include static pages in your Rails app»
This replaces the "application" directory where were stored some common static pages
2016-10-31 23:44:44 +01:00

20 lines
457 B
Ruby

# Migrate some i18n translations in the database to the high_voltage static
# page CMS
class MigrateI18nToHighVoltage < ActiveRecord::Migration
def up
update "
update translations
set `key` = replace(`key`, 'application', 'pages')
where `key` like 'application.%'
"
end
def down
update "
update translations
set `key` = replace(`key`, 'pages', 'application')
where `key` like 'pages.%'
"
end
end