summaryrefslogtreecommitdiffstats
path: root/db/migrate/039_create_watchers.rb
blob: d37310e51a937560353964dc679b1463fdf0db12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: false

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