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

18 lines
381 B
Ruby
Raw Permalink Normal View History

class TranslateItems < ActiveRecord::Migration[4.2]
2013-01-11 14:20:06 -08:00
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