Skip to content

A platform for community discussion. Free, open, simple.

annotate new indexes

Sam Saffronc617e512addc
diff --git a/app/models/post_action.rb b/app/models/post_action.rb
index d7abf01391a..5fd9d506de5 100644
--- a/app/models/post_action.rb
+++ b/app/models/post_action.rb
@@ -263,5 +263,6 @@ end
# idx_unique_flags (user_id,post_id,targets_topic) UNIQUE WHERE ((deleted_at IS NULL) AND (disagreed_at IS NULL) AND (deferred_at IS NULL) AND (post_action_type_id = ANY (ARRAY[3, 4, 7, 8])))
# index_post_actions_on_post_action_type_id_and_disagreed_at (post_action_type_id,disagreed_at) WHERE (disagreed_at IS NULL)
# index_post_actions_on_post_id (post_id)
+# index_post_actions_on_user_id (user_id)
# index_post_actions_on_user_id_and_post_action_type_id (user_id,post_action_type_id) WHERE (deleted_at IS NULL)
#
diff --git a/app/models/topic_link.rb b/app/models/topic_link.rb
index 43c41d563e4..a45c7e1c366 100644
--- a/app/models/topic_link.rb
+++ b/app/models/topic_link.rb
@@ -316,5 +316,6 @@ end
# index_topic_links_on_link_post_id_and_reflection (link_post_id,reflection)
# index_topic_links_on_post_id (post_id)
# index_topic_links_on_topic_id (topic_id)
+# index_topic_links_on_user_id (user_id)
# unique_post_links (topic_id,post_id,url) UNIQUE
#
diff --git a/app/models/user_action.rb b/app/models/user_action.rb
index 7e043b71078..bd84eaadbb5 100644
--- a/app/models/user_action.rb
+++ b/app/models/user_action.rb
@@ -433,5 +433,6 @@ end
# index_user_actions_on_acting_user_id (acting_user_id)
# index_user_actions_on_action_type_and_created_at (action_type,created_at)
# index_user_actions_on_target_post_id (target_post_id)
+# index_user_actions_on_target_user_id (target_user_id) WHERE (target_user_id IS NOT NULL)
# index_user_actions_on_user_id_and_action_type (user_id,action_type)
#
diff --git a/app/models/user_auth_token_log.rb b/app/models/user_auth_token_log.rb
index b2edaebe545..8d17e9cb703 100644
--- a/app/models/user_auth_token_log.rb
+++ b/app/models/user_auth_token_log.rb
@@ -16,3 +16,7 @@ end
# created_at :datetime
# path :string
#
+# Indexes
+#
+# index_user_auth_token_logs_on_user_id (user_id)
+#
diff --git a/app/models/user_upload.rb b/app/models/user_upload.rb
index c60b724b91c..fa0c7d4ed1d 100644
--- a/app/models/user_upload.rb
+++ b/app/models/user_upload.rb
@@ -15,4 +15,5 @@ end
# Indexes
#
# index_user_uploads_on_upload_id_and_user_id (upload_id,user_id) UNIQUE
+# index_user_uploads_on_user_id_and_upload_id (user_id,upload_id)
#