discourse/db/migrate/20121123063630_create_user_visits.rb

11 lines
260 B
Ruby
Raw Normal View History

2013-02-05 13:16:51 -06:00
class CreateUserVisits < ActiveRecord::Migration
def change
create_table :user_visits do |t|
t.integer :user_id, null: false
t.date :visited_at, null: false
end
add_index :user_visits, [:user_id, :visited_at], unique: true
end
end