thingspeak/db/migrate/20110428182848_create_watchings.rb
2014-02-17 12:05:39 -05:00

19 lines
342 B
Ruby

class CreateWatchings < ActiveRecord::Migration
def self.up
create_table :watchings do |t|
t.integer :user_id
t.integer :channel_id
t.timestamps
end
add_index :watchings, [:user_id, :channel_id]
end
def self.down
remove_index :watchings, [:user_id, :channel_id]
drop_table :watchings
end
end