mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
10 lines
260 B
Ruby
10 lines
260 B
Ruby
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
|