1
0
Fork 0
forked from OpenNeo/impress
impress/db/migrate/20130111213346_translate_items.rb

18 lines
376 B
Ruby
Raw Normal View History

2013-01-11 14:20:06 -08:00
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