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