039_create_watchers.rb 342 Bytes
Newer Older
1
class CreateWatchers < ActiveRecord::Migration[4.2]
jplang's avatar
jplang committed
2 3 4 5 6 7 8 9 10 11 12 13
  def self.up
    create_table :watchers do |t|
      t.column :watchable_type, :string, :default => "", :null => false
      t.column :watchable_id, :integer, :default => 0, :null => false
      t.column :user_id, :integer
    end
  end

  def self.down
    drop_table :watchers
  end
end