impress/db/migrate/20130111213346_translate_items.rb
2013-01-24 18:24:34 -06:00

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