mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 10:36:30 +08:00
11 lines
265 B
Ruby
11 lines
265 B
Ruby
class CreateUserVisits < ActiveRecord::Migration[4.2]
|
|
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
|