Sha256: 4473c9dd069176e7ee55963f67e8b684583a08c94073764968385c30d31227a1
Contents?: true
Size: 375 Bytes
Versions: 65
Compression:
Stored size: 375 Bytes
Contents
class MakeStateEventsPolymorphic < ActiveRecord::Migration def self.up rename_column :state_events, :order_id, :stateful_id add_column :state_events, :stateful_type, :string StateEvent.update_all(:stateful_type => 'Order') end def self.down rename_column :state_events, :stateful_id, :order_id remove_column :state_events, :stateful_type end end
Version data entries
65 entries across 53 versions & 10 rubygems