Annotate models.

This commit is contained in:
Guo Xiang Tan 2019-04-02 13:17:55 +08:00
parent a9a35d2c19
commit d85240335b
7 changed files with 39 additions and 8 deletions

View File

@ -732,10 +732,12 @@ end
# suppress_from_latest :boolean default(FALSE) # suppress_from_latest :boolean default(FALSE)
# minimum_required_tags :integer default(0), not null # minimum_required_tags :integer default(0), not null
# navigate_to_first_post_after_read :boolean default(FALSE), not null # navigate_to_first_post_after_read :boolean default(FALSE), not null
# search_priority :integer default(0)
# #
# Indexes # Indexes
# #
# index_categories_on_email_in (email_in) UNIQUE # index_categories_on_email_in (email_in) UNIQUE
# index_categories_on_search_priority (search_priority)
# index_categories_on_topic_count (topic_count) # 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

@ -2,3 +2,20 @@ class GroupRequest < ActiveRecord::Base
belongs_to :group belongs_to :group
belongs_to :user belongs_to :user
end end
# == Schema Information
#
# Table name: group_requests
#
# id :bigint(8) not null, primary key
# group_id :integer
# user_id :integer
# reason :text
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_group_requests_on_group_id (group_id)
# index_group_requests_on_user_id (user_id)
#

View File

@ -12,6 +12,8 @@ end
# ignored_user_id :integer not null # ignored_user_id :integer not null
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# summarized_at :datetime
# expiring_at :datetime
# #
# Indexes # Indexes
# #

View File

@ -261,6 +261,7 @@ end
# #
# 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_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]))) # 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_post_id (post_id)
# index_post_actions_on_user_id_and_post_action_type_id (user_id,post_action_type_id) WHERE (deleted_at IS NULL) # index_post_actions_on_user_id_and_post_action_type_id (user_id,post_action_type_id) WHERE (deleted_at IS NULL)
# #

View File

@ -185,3 +185,7 @@ end
# created_at :datetime not null # created_at :datetime not null
# search_result_type :integer # search_result_type :integer
# #
# Indexes
#
# index_search_logs_on_created_at (created_at)
#

View File

@ -212,3 +212,7 @@ end
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# #
# Indexes
#
# index_site_settings_on_name (name) UNIQUE
#

View File

@ -37,5 +37,6 @@ end
# #
# Indexes # Indexes
# #
# index_user_second_factors_on_method_and_enabled (method,enabled)
# index_user_second_factors_on_user_id (user_id) # index_user_second_factors_on_user_id (user_id)
# #