aendere translate themen

This commit is contained in:
Andreas Stephanides
2013-08-18 21:20:04 +02:00
parent 36a4f282c8
commit e77a0dd8f8

View File

@@ -4,35 +4,30 @@ class TranslateThemen < ActiveRecord::Migration
:title => :string,
:text => :text
}, {
#:migrate_data => true
:migrate_data => true
})
add_column :thema_translations, :theman_id, :integer
remove_column :thema_translations, :thema_id
Themengruppe.create_translation_table!({
:title => :string,
:text => :text
}, {
#:migrate_data => true
:migrate_data => true
})
add_column :themengruppe_translations, :themengruppen_id, :integer
remove_column :themengruppe_translations, :themengruppe_id
Frage.create_translation_table!({
:title => :string,
:text => :text
}, {
#:migrate_data => true
:migrate_data => true
})
add_column :frage_translations, :fragen_id, :integer
remove_column :frage_translations, :frage_id
end
def down
Thema.drop_translation_table! #:migrate_data => true
Themengruppe.drop_translation_table! #:migrate_data => true
Frage.drop_translation_table! #:migrate_data => true
Thema.drop_translation_table! :migrate_data => true
Themengruppe.drop_translation_table! :migrate_data => true
Frage.drop_translation_table! :migrate_data => true
end
end