PERF: last seen index on users
This commit is contained in:
parent
022109bc76
commit
b5045a005f
|
@ -250,6 +250,7 @@ end
|
|||
# badge_grouping_id :integer default(5), not null
|
||||
# trigger :integer
|
||||
# show_posts :boolean default(FALSE), not null
|
||||
# system :boolean default(FALSE), not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
|
|
|
@ -784,6 +784,7 @@ end
|
|||
#
|
||||
# index_users_on_auth_token (auth_token)
|
||||
# index_users_on_last_posted_at (last_posted_at)
|
||||
# index_users_on_last_seen_at (last_seen_at)
|
||||
# index_users_on_username (username) UNIQUE
|
||||
# index_users_on_username_lower (username_lower) UNIQUE
|
||||
#
|
||||
|
|
|
@ -95,4 +95,9 @@ end
|
|||
# bio_cooked :text
|
||||
# dismissed_banner_key :integer
|
||||
# profile_background :string(255)
|
||||
# bio_cooked_version :integer
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_user_profiles_on_bio_cooked_version (bio_cooked_version)
|
||||
#
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddIndexOnLastSeenToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :users, [:last_seen_at]
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue