You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

039_create_watchers.rb 342B

12345678910111213
  1. class CreateWatchers < ActiveRecord::Migration[4.2]
  2. def self.up
  3. create_table :watchers do |t|
  4. t.column :watchable_type, :string, :default => "", :null => false
  5. t.column :watchable_id, :integer, :default => 0, :null => false
  6. t.column :user_id, :integer
  7. end
  8. end
  9. def self.down
  10. drop_table :watchers
  11. end
  12. end