class RefactorImagesToPolymorphic < ActiveRecord::Migration def self.up add_column :images, :item_type, :string remove_column :images, :auction_item_id end def self.down add_column :images, :auction_item_id, :integer remove_column :images, :item_type end end