Update annotations.

This commit is contained in:
Guo Xiang Tan 2018-07-16 14:18:07 +08:00
parent 39299fdd8c
commit 214dac05de
26 changed files with 47 additions and 45 deletions

View File

@ -597,5 +597,5 @@ end
#
# index_categories_on_email_in (email_in) UNIQUE
# index_categories_on_topic_count (topic_count)
# unique_index_categories_on_name (COALESCE(parent_category_id, '-1'::integer), name) UNIQUE
# unique_index_categories_on_name ((COALESCE(parent_category_id, '-1'::integer)), name) UNIQUE
#

View File

@ -14,5 +14,5 @@ end
#
# Indexes
#
# idx_search_category (search_data)
# idx_search_category (search_data) USING gin
#

View File

@ -66,9 +66,9 @@ end
#
# Table name: category_tag_stats
#
# id :integer not null, primary key
# category_id :integer not null
# tag_id :integer not null
# id :bigint(8) not null, primary key
# category_id :bigint(8) not null
# tag_id :bigint(8) not null
# topic_count :integer default(0), not null
#
# Indexes

View File

@ -90,12 +90,12 @@ end
#
# Indexes
#
# idx_email_logs_user_created_filtered (user_id,created_at)
# idx_email_logs_user_created_filtered (user_id,created_at) WHERE (skipped = false)
# index_email_logs_on_created_at (created_at)
# index_email_logs_on_message_id (message_id)
# index_email_logs_on_post_id (post_id)
# index_email_logs_on_reply_key (reply_key)
# index_email_logs_on_skipped_and_created_at (skipped,created_at)
# index_email_logs_on_topic_id (topic_id)
# index_email_logs_on_user_id_and_created_at (user_id,created_at)
# index_email_logs_on_user_id_and_created_at (user_id,created_at DESC)
#

View File

@ -8,7 +8,7 @@ end
#
# id :integer not null, primary key
# user_id :integer not null
# facebook_user_id :integer not null
# facebook_user_id :bigint(8) not null
# username :string
# first_name :string
# last_name :string

View File

@ -227,9 +227,9 @@ end
#
# Indexes
#
# idx_notifications_speedup_unread_count (user_id,notification_type)
# idx_notifications_speedup_unread_count (user_id,notification_type) WHERE (NOT read)
# index_notifications_on_post_action_id (post_action_id)
# index_notifications_on_user_id_and_created_at (user_id,created_at)
# index_notifications_on_user_id_and_id (user_id,id) UNIQUE
# index_notifications_on_user_id_and_id (user_id,id) UNIQUE WHERE ((notification_type = 6) AND (NOT read))
# index_notifications_on_user_id_and_topic_id_and_post_number (user_id,topic_id,post_number)
#

View File

@ -873,10 +873,12 @@ end
#
# Indexes
#
# idx_posts_created_at_topic_id (created_at,topic_id)
# idx_posts_deleted_posts (topic_id,post_number)
# idx_posts_user_id_deleted_at (user_id)
# index_posts_on_reply_to_post_number (reply_to_post_number)
# index_posts_on_topic_id_and_post_number (topic_id,post_number) UNIQUE
# index_posts_on_user_id_and_created_at (user_id,created_at)
# 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_posts_on_reply_to_post_number (reply_to_post_number)
# index_posts_on_topic_id_and_percent_rank (topic_id,percent_rank)
# index_posts_on_topic_id_and_post_number (topic_id,post_number) UNIQUE
# index_posts_on_topic_id_and_sort_order (topic_id,sort_order)
# index_posts_on_user_id_and_created_at (user_id,created_at)
#

View File

@ -657,8 +657,8 @@ end
#
# Indexes
#
# idx_unique_actions (user_id,post_action_type_id,post_id,targets_topic) UNIQUE
# idx_unique_flags (user_id,post_id,targets_topic) UNIQUE
# idx_unique_actions (user_id,post_action_type_id,post_id,targets_topic) UNIQUE WHERE ((deleted_at IS NULL) AND (disagreed_at IS NULL) AND (deferred_at IS NULL))
# 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_id (post_id)
# index_post_actions_on_user_id_and_post_action_type_id (user_id,post_action_type_id)
# index_post_actions_on_user_id_and_post_action_type_id (user_id,post_action_type_id) WHERE (deleted_at IS NULL)
#

View File

@ -15,7 +15,7 @@ end
#
# Indexes
#
# idx_post_custom_fields_akismet (post_id)
# 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_and_name (post_id,name)
#

View File

@ -14,5 +14,5 @@ end
#
# Indexes
#
# idx_search_post (search_data)
# idx_search_post (search_data) USING gin
#

View File

@ -6,7 +6,7 @@ end
#
# Table name: push_subscriptions
#
# id :integer not null, primary key
# id :bigint(8) not null, primary key
# user_id :integer not null
# data :string not null
# created_at :datetime not null

View File

@ -11,7 +11,7 @@ end
# category_id :integer not null
# created_at :datetime not null
# updated_at :datetime not null
# id :integer not null, primary key
# id :bigint(8) not null, primary key
#
# Indexes
#

View File

@ -12,9 +12,9 @@ end
#
# Table name: tag_group_permissions
#
# id :integer not null, primary key
# tag_group_id :integer not null
# group_id :integer not null
# id :bigint(8) not null, primary key
# tag_group_id :bigint(8) not null
# group_id :bigint(8) not null
# permission_type :integer default(1), not null
# created_at :datetime not null
# updated_at :datetime not null

View File

@ -14,5 +14,5 @@ end
#
# Indexes
#
# idx_search_tag (search_data)
# idx_search_tag (search_data) USING gin
#

View File

@ -56,7 +56,7 @@ end
#
# Table name: theme_settings
#
# id :integer not null, primary key
# id :bigint(8) not null, primary key
# name :string(255) not null
# data_type :integer not null
# value :text

View File

@ -1453,12 +1453,12 @@ end
# Indexes
#
# idx_topics_front_page (deleted_at,visible,archetype,category_id,id)
# idx_topics_user_id_deleted_at (user_id)
# idxtopicslug (slug)
# idx_topics_user_id_deleted_at (user_id) WHERE (deleted_at IS NULL)
# idxtopicslug (slug) WHERE ((deleted_at IS NULL) AND (slug IS NOT NULL))
# index_topics_on_bumped_at (bumped_at)
# index_topics_on_created_at_and_visible (created_at,visible)
# index_topics_on_created_at_and_visible (created_at,visible) WHERE ((deleted_at IS NULL) AND ((archetype)::text <> 'private_message'::text))
# index_topics_on_id_and_deleted_at (id,deleted_at)
# index_topics_on_lower_title (lower((title)::text))
# index_topics_on_pinned_at (pinned_at)
# index_topics_on_pinned_globally (pinned_globally)
# index_topics_on_pinned_at (pinned_at) WHERE (pinned_at IS NOT NULL)
# index_topics_on_pinned_globally (pinned_globally) WHERE pinned_globally
#

View File

@ -16,5 +16,5 @@ end
# Indexes
#
# index_topic_custom_fields_on_topic_id_and_name (topic_id,name)
# topic_custom_fields_value_key_idx (value,name)
# topic_custom_fields_value_key_idx (value,name) WHERE ((value IS NOT NULL) AND (char_length(value) < 400))
#

View File

@ -14,5 +14,5 @@ end
#
# Indexes
#
# idx_search_topic (search_data)
# idx_search_topic (search_data) USING gin
#

View File

@ -164,6 +164,6 @@ end
#
# Indexes
#
# idx_topic_id_public_type_deleted_at (topic_id) UNIQUE
# idx_topic_id_public_type_deleted_at (topic_id) UNIQUE WHERE ((public_type = true) AND (deleted_at IS NULL))
# index_topic_timers_on_user_id (user_id)
#

View File

@ -9,7 +9,7 @@ end
# id :integer not null, primary key
# user_id :integer not null
# screen_name :string not null
# twitter_user_id :integer not null
# twitter_user_id :bigint(8) not null
# created_at :datetime not null
# updated_at :datetime not null
# email :string(1000)

View File

@ -1314,8 +1314,8 @@ end
#
# Indexes
#
# idx_users_admin (id)
# idx_users_moderator (id)
# idx_users_admin (id) WHERE admin
# idx_users_moderator (id) WHERE moderator
# index_users_on_last_posted_at (last_posted_at)
# index_users_on_last_seen_at (last_seen_at)
# index_users_on_uploaded_avatar_id (uploaded_avatar_id)

View File

@ -47,7 +47,7 @@ end
# Indexes
#
# index_user_badges_on_badge_id_and_user_id (badge_id,user_id)
# index_user_badges_on_badge_id_and_user_id_and_post_id (badge_id,user_id,post_id) UNIQUE
# index_user_badges_on_badge_id_and_user_id_and_seq (badge_id,user_id,seq) UNIQUE
# index_user_badges_on_badge_id_and_user_id_and_post_id (badge_id,user_id,post_id) UNIQUE WHERE (post_id IS NOT NULL)
# index_user_badges_on_badge_id_and_user_id_and_seq (badge_id,user_id,seq) UNIQUE WHERE (post_id IS NULL)
# index_user_badges_on_user_id (user_id)
#

View File

@ -61,5 +61,5 @@ end
#
# index_user_emails_on_email (lower((email)::text)) UNIQUE
# index_user_emails_on_user_id (user_id)
# index_user_emails_on_user_id_and_primary (user_id,primary) UNIQUE
# index_user_emails_on_user_id_and_primary (user_id,primary) UNIQUE WHERE "primary"
#

View File

@ -14,5 +14,5 @@ end
#
# Indexes
#
# idx_search_user (search_data)
# idx_search_user (search_data) USING gin
#

View File

@ -22,7 +22,7 @@ end
#
# Table name: user_second_factors
#
# id :integer not null, primary key
# id :bigint(8) not null, primary key
# user_id :integer not null
# method :integer not null
# data :string not null

View File

@ -79,7 +79,7 @@ end
#
# Table name: web_crawler_requests
#
# id :integer not null, primary key
# id :bigint(8) not null, primary key
# date :date not null
# user_agent :string not null
# count :integer default(0), not null