From d705dd8bb82c0137c99dc06edb401ea86331fb2e Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 11 Apr 2019 12:37:11 +0800 Subject: [PATCH] Update annotations. --- app/models/post.rb | 1 + app/models/post_custom_field.rb | 1 + app/models/post_reply.rb | 1 + 3 files changed, 3 insertions(+) diff --git a/app/models/post.rb b/app/models/post.rb index 7dbbe7e03e4..98d7a821db8 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -999,6 +999,7 @@ end # idx_posts_created_at_topic_id (created_at,topic_id) WHERE (deleted_at IS NULL) # idx_posts_deleted_posts (topic_id,post_number) WHERE (deleted_at IS NOT NULL) # idx_posts_user_id_deleted_at (user_id) WHERE (deleted_at IS NULL) +# index_for_rebake_old (id) WHERE (((baked_version IS NULL) OR (baked_version < 2)) AND (deleted_at IS NULL)) # index_posts_on_id_and_baked_version (id DESC,baked_version) WHERE (deleted_at IS NULL) # index_posts_on_reply_to_post_number (reply_to_post_number) # index_posts_on_topic_id_and_percent_rank (topic_id,percent_rank) diff --git a/app/models/post_custom_field.rb b/app/models/post_custom_field.rb index 8c32eb80302..6dffbfc6ec6 100644 --- a/app/models/post_custom_field.rb +++ b/app/models/post_custom_field.rb @@ -17,5 +17,6 @@ end # # idx_post_custom_fields_akismet (post_id) WHERE (((name)::text = 'AKISMET_STATE'::text) AND (value = 'needs_review'::text)) # index_post_custom_fields_on_name_and_value (name, "left"(value, 200)) +# index_post_custom_fields_on_post_id (post_id) UNIQUE WHERE ((name)::text = 'missing uploads'::text) # index_post_custom_fields_on_post_id_and_name (post_id,name) # diff --git a/app/models/post_reply.rb b/app/models/post_reply.rb index c763751bab7..f4cba4f0449 100644 --- a/app/models/post_reply.rb +++ b/app/models/post_reply.rb @@ -29,4 +29,5 @@ end # Indexes # # index_post_replies_on_post_id_and_reply_id (post_id,reply_id) UNIQUE +# index_post_replies_on_reply_id (reply_id) #