17 lines
376 B
Ruby
17 lines
376 B
Ruby
class TranslateItems < ActiveRecord::Migration
|
|
def self.up
|
|
rename_table :objects, :items
|
|
Item.create_translation_table!({
|
|
:name => :string,
|
|
:description => :text,
|
|
:rarity => :string
|
|
}, {
|
|
:migrate_data => true
|
|
})
|
|
end
|
|
|
|
def self.down
|
|
Item.drop_translation_table! :migrate_data => true
|
|
rename_table :items, :objects
|
|
end
|
|
end
|