mirror of
https://github.com/discourse/discourse.git
synced 2026-07-29 15:54:48 -05:00
DEV: Apply syntax_tree formatting to db/*
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
class AddTimeReadToUserVisits < ActiveRecord::Migration[5.1]
|
||||
def up
|
||||
add_column :user_visits, :time_read, :integer, null: false, default: 0 # in seconds
|
||||
add_index :user_visits, [:user_id, :visited_at, :time_read]
|
||||
add_index :user_visits, %i[user_id visited_at time_read]
|
||||
end
|
||||
|
||||
def down
|
||||
remove_index :user_visits, [:user_id, :visited_at, :time_read]
|
||||
remove_index :user_visits, %i[user_id visited_at time_read]
|
||||
remove_column :user_visits, :time_read
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user