|
| 1 | +# This migration comes from spree_i18n (originally 20130419041407) |
| 2 | +class AddTranslationsToMainModels < ActiveRecord::Migration |
| 3 | + def up |
| 4 | + params = { :name => :string, :description => :text, :meta_description => :string, |
| 5 | + :meta_keywords => :string } |
| 6 | + Spree::Product.create_translation_table!(params, { :migrate_data => true }) |
| 7 | + |
| 8 | + params = { :name => :string, :description => :string } |
| 9 | + Spree::Promotion.create_translation_table!(params, { :migrate_data => true }) |
| 10 | + |
| 11 | + params = { :name => :string, :presentation => :string } |
| 12 | + Spree::OptionType.create_translation_table!(params, { :migrate_data => true }) |
| 13 | + Spree::Property.create_translation_table!(params, { :migrate_data => true }) |
| 14 | + |
| 15 | + Spree::Taxonomy.create_translation_table!({ :name => :string }, { :migrate_data => true }) |
| 16 | + |
| 17 | + params = { :name => :string, :description => :text, :meta_title => :string, |
| 18 | + :meta_description => :string, :meta_keywords => :string, |
| 19 | + :permalink => :string } |
| 20 | + Spree::Taxon.create_translation_table!(params, { :migrate_data => true }) |
| 21 | + end |
| 22 | + |
| 23 | + def down |
| 24 | + Spree::Product.drop_translation_table! :migrate_data => true |
| 25 | + Spree::Promotion.drop_translation_table! :migrate_data => true |
| 26 | + Spree::Property.drop_translation_table! :migrate_data => true |
| 27 | + Spree::OptionType.drop_translation_table! :migrate_data => true |
| 28 | + Spree::Taxonomy.drop_translation_table! :migrate_data => true |
| 29 | + Spree::Taxon.drop_translation_table! :migrate_data => true |
| 30 | + end |
| 31 | +end |
0 commit comments