diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-09-25 17:05:11 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-09-25 17:05:11 +0100 |
commit | a9f3876005f718b9a1cc850bed91c86b6fd9efb7 (patch) | |
tree | b1c3e6d1f064a970b27e3c0c8b3330d7c08a6211 | |
parent | 32702d2fa670b2698c6e81f845322cb3c34a1d0f (diff) |
fixup! Use translation tables for PublicBodyCategory and PublicBodyHeading
-rw-r--r-- | db/migrate/20140716131107_create_category_translation_tables.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20140716131107_create_category_translation_tables.rb b/db/migrate/20140716131107_create_category_translation_tables.rb index 813a46c65..3fe50ad33 100644 --- a/db/migrate/20140716131107_create_category_translation_tables.rb +++ b/db/migrate/20140716131107_create_category_translation_tables.rb @@ -82,6 +82,9 @@ class CreateCategoryTranslationTables < ActiveRecord::Migration # finally, drop the old locale column from both tables remove_column :public_body_headings, :locale remove_column :public_body_categories, :locale + remove_column :public_body_headings, :name + remove_column :public_body_categories, :title + remove_column :public_body_categories, :description # and set category_tag to be unique add_index :public_body_categories, :category_tag, :unique => true @@ -91,6 +94,9 @@ class CreateCategoryTranslationTables < ActiveRecord::Migration # reinstate the columns add_column :public_body_categories, :locale, :string add_column :public_body_headings, :locale, :string + add_column :public_body_headings, :name, :string + add_column :public_body_categories, :title, :string + add_column :public_body_categories, :description, :string # drop the index remove_index :public_body_categories, :category_tag @@ -148,4 +154,4 @@ class CreateCategoryTranslationTables < ActiveRecord::Migration PublicBodyCategory.drop_translation_table! PublicBodyHeading.drop_translation_table! end -end
\ No newline at end of file +end |