summaryrefslogtreecommitdiffstats
path: root/db/migrate/039_create_watchers.rb
blob: 9579e19a4ef9d088a024415fbef05a0497514aad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class CreateWatchers < ActiveRecord::Migration
  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