ref: master
db/migrate/20100910205408_create_action_tracker.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
class CreateActionTracker < ActiveRecord::Migration def self.up create_table :action_tracker do |t| t.belongs_to :user, :polymorphic => true t.belongs_to :dispatcher, :polymorphic => true t.text :params t.string :verb t.timestamps end change_table :action_tracker do |t| t.index [:user_id, :user_type] t.index [:dispatcher_id, :dispatcher_type] t.index :verb end end def self.down drop_table :action_tracker end end |