DEV: Update core model annotations

Generated using `bin/rake annotate:clean`
This commit is contained in:
David Taylor 2021-07-05 23:14:15 +01:00
parent 8c370c3fe3
commit 4b55b59931
25 changed files with 152 additions and 35 deletions

View File

@ -1026,7 +1026,7 @@ end
# min_tags_from_required_group :integer default(1), not null # min_tags_from_required_group :integer default(1), not null
# read_only_banner :string # read_only_banner :string
# default_list_filter :string(20) default("all") # default_list_filter :string(20) default("all")
# allow_unlimited_owner_edits_on_first_post :boolean default(FALSE) # allow_unlimited_owner_edits_on_first_post :boolean default(FALSE), not null
# #
# Indexes # Indexes
# #

View File

@ -50,3 +50,22 @@ class DirectoryColumn < ActiveRecord::Base
end end
end end
end end
# == Schema Information
#
# Table name: directory_columns
#
# id :bigint not null, primary key
# name :string
# automatic_position :integer
# icon :string
# user_field_id :integer
# enabled :boolean not null
# position :integer not null
# created_at :datetime
# type :integer default("automatic"), not null
#
# Indexes
#
# directory_column_index (enabled,position,user_field_id)
#

View File

@ -11,3 +11,21 @@ class DoNotDisturbTiming < ActiveRecord::Base
end end
end end
end end
# == Schema Information
#
# Table name: do_not_disturb_timings
#
# id :bigint not null, primary key
# user_id :integer not null
# starts_at :datetime not null
# ends_at :datetime not null
# scheduled :boolean default(FALSE)
#
# Indexes
#
# index_do_not_disturb_timings_on_ends_at (ends_at)
# index_do_not_disturb_timings_on_scheduled (scheduled)
# index_do_not_disturb_timings_on_starts_at (starts_at)
# index_do_not_disturb_timings_on_user_id (user_id)
#

View File

@ -17,7 +17,7 @@ end
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# summarized_at :datetime # summarized_at :datetime
# expiring_at :datetime # expiring_at :datetime not null
# #
# Indexes # Indexes
# #

View File

@ -109,6 +109,7 @@ end
# imap_uid :integer # imap_uid :integer
# imap_sync :boolean # imap_sync :boolean
# imap_group_id :bigint # imap_group_id :bigint
# imap_missing :boolean default(FALSE), not null
# created_via :integer default(0), not null # created_via :integer default(0), not null
# #
# Indexes # Indexes

View File

@ -290,6 +290,7 @@ end
# max_redemptions_allowed :integer default(1), not null # max_redemptions_allowed :integer default(1), not null
# redemption_count :integer default(0), not null # redemption_count :integer default(0), not null
# expires_at :datetime not null # expires_at :datetime not null
# email_token :string
# #
# Indexes # Indexes
# #

View File

@ -19,8 +19,7 @@ end
# #
# idx_post_custom_fields_akismet (post_id) WHERE (((name)::text = 'AKISMET_STATE'::text) AND (value = 'needs_review'::text)) # 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_name_and_value (name, "left"(value, 200))
# index_post_custom_fields_on_notice_args (post_id) UNIQUE WHERE ((name)::text = 'notice_args'::text) # index_post_custom_fields_on_notice (post_id) UNIQUE WHERE ((name)::text = 'notice'::text)
# index_post_custom_fields_on_notice_type (post_id) UNIQUE WHERE ((name)::text = 'notice_type'::text)
# index_post_custom_fields_on_post_id (post_id) UNIQUE WHERE ((name)::text = 'missing uploads'::text) # 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) # index_post_custom_fields_on_post_id_and_name (post_id,name)
# index_post_id_where_missing_uploads_ignored (post_id) UNIQUE WHERE ((name)::text = 'missing uploads ignored'::text) # index_post_id_where_missing_uploads_ignored (post_id) UNIQUE WHERE ((name)::text = 'missing uploads ignored'::text)

View File

@ -12,11 +12,11 @@ end
# #
# Table name: push_subscriptions # Table name: push_subscriptions
# #
# id :bigint not null, primary key # id :bigint not null, primary key
# user_id :integer not null # user_id :integer not null
# data :string not null # data :string not null
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# error_count :integer default(0), not null # error_count :integer default(0), not null
# first_error_at :datetime # first_error_at :datetime
# #

View File

@ -352,6 +352,8 @@ end
# latest_score :datetime # latest_score :datetime
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# force_review :boolean default(FALSE), not null
# reject_reason :text
# #
# Indexes # Indexes
# #

View File

@ -109,3 +109,39 @@ class ReviewablePost < Reviewable
end end
end end
end end
# == Schema Information
#
# Table name: reviewables
#
# id :bigint not null, primary key
# type :string not null
# status :integer default(0), not null
# created_by_id :integer not null
# reviewable_by_moderator :boolean default(FALSE), not null
# reviewable_by_group_id :integer
# category_id :integer
# topic_id :integer
# score :float default(0.0), not null
# potential_spam :boolean default(FALSE), not null
# target_id :integer
# target_type :string
# target_created_by_id :integer
# payload :json
# version :integer default(0), not null
# latest_score :datetime
# created_at :datetime not null
# updated_at :datetime not null
# force_review :boolean default(FALSE), not null
# reject_reason :text
#
# Indexes
#
# index_reviewables_on_reviewable_by_group_id (reviewable_by_group_id)
# index_reviewables_on_status_and_created_at (status,created_at)
# index_reviewables_on_status_and_score (status,score)
# index_reviewables_on_status_and_type (status,type)
# index_reviewables_on_target_id_where_post_type_eq_post (target_id) WHERE ((target_type)::text = 'Post'::text)
# index_reviewables_on_topic_id_and_status_and_created_by_id (topic_id,status,created_by_id)
# index_reviewables_on_type_and_target_id (type,target_id) UNIQUE
#

View File

@ -181,6 +181,8 @@ end
# latest_score :datetime # latest_score :datetime
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# force_review :boolean default(FALSE), not null
# reject_reason :text
# #
# Indexes # Indexes
# #

View File

@ -121,6 +121,8 @@ end
# latest_score :datetime # latest_score :datetime
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# force_review :boolean default(FALSE), not null
# reject_reason :text
# #
# Indexes # Indexes
# #

View File

@ -90,6 +90,6 @@ end
# #
# Indexes # Indexes
# #
# index_blocked_emails_on_email (email) UNIQUE # index_screened_emails_on_email (email) UNIQUE
# index_blocked_emails_on_last_match_at (last_match_at) # index_screened_emails_on_last_match_at (last_match_at)
# #

View File

@ -7,3 +7,15 @@ class ShelvedNotification < ActiveRecord::Base
NotificationEmailer.process_notification(notification, no_delay: true) NotificationEmailer.process_notification(notification, no_delay: true)
end end
end end
# == Schema Information
#
# Table name: shelved_notifications
#
# id :bigint not null, primary key
# notification_id :integer not null
#
# Indexes
#
# index_shelved_notifications_on_notification_id (notification_id)
#

View File

@ -98,13 +98,12 @@ end
# #
# Table name: theme_modifier_sets # Table name: theme_modifier_sets
# #
# id :bigint not null, primary key # id :bigint not null, primary key
# theme_id :bigint not null # theme_id :bigint not null
# serialize_topic_excerpts :boolean # serialize_topic_excerpts :boolean
# csp_extensions :string is an Array # csp_extensions :string is an Array
# svg_icons :string is an Array # svg_icons :string is an Array
# discourse_teams_sidebar_disabled :boolean # topic_thumbnail_sizes :string is an Array
# topic_thumbnail_sizes :string is an Array
# #
# Indexes # Indexes
# #

View File

@ -1826,13 +1826,15 @@ end
# reviewable_score :float default(0.0), not null # reviewable_score :float default(0.0), not null
# image_upload_id :bigint # image_upload_id :bigint
# slow_mode_seconds :integer default(0), not null # slow_mode_seconds :integer default(0), not null
# bannered_until :datetime
# #
# Indexes # Indexes
# #
# idx_topics_front_page (deleted_at,visible,archetype,category_id,id) # idx_topics_front_page (deleted_at,visible,archetype,category_id,id)
# idx_topics_user_id_deleted_at (user_id) WHERE (deleted_at IS NULL) # 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)) # idxtopicslug (slug) WHERE ((deleted_at IS NULL) AND (slug IS NOT NULL))
# index_forum_threads_on_bumped_at (bumped_at) # index_topics_on_bannered_until (bannered_until) WHERE (bannered_until IS NOT NULL)
# index_topics_on_bumped_at (bumped_at)
# index_topics_on_created_at_and_visible (created_at,visible) WHERE ((deleted_at IS NULL) AND ((archetype)::text <> 'private_message'::text)) # 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_id_and_deleted_at (id,deleted_at)
# index_topics_on_id_filtered_banner (id) UNIQUE WHERE (((archetype)::text = 'banner'::text) AND (deleted_at IS NULL)) # index_topics_on_id_filtered_banner (id) UNIQUE WHERE (((archetype)::text = 'banner'::text) AND (deleted_at IS NULL))
@ -1840,6 +1842,7 @@ end
# index_topics_on_lower_title (lower((title)::text)) # index_topics_on_lower_title (lower((title)::text))
# index_topics_on_pinned_at (pinned_at) WHERE (pinned_at IS NOT NULL) # index_topics_on_pinned_at (pinned_at) WHERE (pinned_at IS NOT NULL)
# index_topics_on_pinned_globally (pinned_globally) WHERE pinned_globally # index_topics_on_pinned_globally (pinned_globally) WHERE pinned_globally
# index_topics_on_pinned_until (pinned_until) WHERE (pinned_until IS NOT NULL)
# index_topics_on_timestamps_private (bumped_at,created_at,updated_at) WHERE ((deleted_at IS NULL) AND ((archetype)::text = 'private_message'::text)) # index_topics_on_timestamps_private (bumped_at,created_at,updated_at) WHERE ((deleted_at IS NULL) AND ((archetype)::text = 'private_message'::text))
# index_topics_on_updated_at_public (updated_at,visible,highest_staff_post_number,highest_post_number,category_id,created_at,id) WHERE (((archetype)::text <> 'private_message'::text) AND (deleted_at IS NULL)) # index_topics_on_updated_at_public (updated_at,visible,highest_staff_post_number,highest_post_number,category_id,created_at,id) WHERE (((archetype)::text <> 'private_message'::text) AND (deleted_at IS NULL))
# #

View File

@ -17,8 +17,6 @@ end
# #
# Indexes # Indexes
# #
# idx_topic_custom_fields_accepted_answer (topic_id) UNIQUE WHERE ((name)::text = 'accepted_answer_post_id'::text)
# index_topic_custom_fields_on_topic_id (topic_id) UNIQUE WHERE ((name)::text = 'vote_count'::text)
# index_topic_custom_fields_on_topic_id_and_name (topic_id,name) # index_topic_custom_fields_on_topic_id_and_name (topic_id,name)
# topic_custom_fields_value_key_idx (value,name) WHERE ((value IS NOT NULL) AND (char_length(value) < 400)) # topic_custom_fields_value_key_idx (value,name) WHERE ((value IS NOT NULL) AND (char_length(value) < 400))
# #

View File

@ -128,5 +128,5 @@ end
# #
# Indexes # Indexes
# #
# index_forum_thread_link_clicks_on_forum_thread_link_id (topic_link_id) # by_link (topic_link_id)
# #

View File

@ -512,6 +512,6 @@ end
# #
# Indexes # Indexes
# #
# index_forum_thread_users_on_forum_thread_id_and_user_id (topic_id,user_id) UNIQUE # index_topic_users_on_topic_id_and_user_id (topic_id,user_id) UNIQUE
# index_topic_users_on_user_id_and_topic_id (user_id,topic_id) UNIQUE # index_topic_users_on_user_id_and_topic_id (user_id,topic_id) UNIQUE
# #

View File

@ -464,9 +464,9 @@ end
# #
# idx_unique_rows (action_type,user_id,target_topic_id,target_post_id,acting_user_id) UNIQUE # idx_unique_rows (action_type,user_id,target_topic_id,target_post_id,acting_user_id) UNIQUE
# idx_user_actions_speed_up_user_all (user_id,created_at,action_type) # idx_user_actions_speed_up_user_all (user_id,created_at,action_type)
# index_actions_on_acting_user_id (acting_user_id) # index_user_actions_on_acting_user_id (acting_user_id)
# index_actions_on_user_id_and_action_type (user_id,action_type)
# index_user_actions_on_action_type_and_created_at (action_type,created_at) # 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_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_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)
# #

View File

@ -122,5 +122,4 @@ end
# 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_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_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) # index_user_badges_on_user_id (user_id)
# index_user_badges_on_is_favorite (is_favorite)
# #

View File

@ -19,8 +19,5 @@ end
# #
# Indexes # Indexes
# #
# idx_user_custom_fields_last_reminded_at (name,user_id) UNIQUE WHERE ((name)::text = 'last_reminded_at'::text) # index_user_custom_fields_on_user_id_and_name (user_id,name)
# idx_user_custom_fields_remind_assigns_frequency (name,user_id) UNIQUE WHERE ((name)::text = 'remind_assigns_frequency'::text)
# idx_user_custom_fields_user_notes_count (name,user_id) UNIQUE WHERE ((name)::text = 'user_notes_count'::text)
# index_user_custom_fields_on_user_id_and_name (user_id,name)
# #

View File

@ -308,10 +308,10 @@ end
# #
# Indexes # Indexes
# #
# index_staff_action_logs_on_action_and_id (action,id)
# index_staff_action_logs_on_subject_and_id (subject,id)
# index_staff_action_logs_on_target_user_id_and_id (target_user_id,id)
# index_user_histories_on_acting_user_id_and_action_and_id (acting_user_id,action,id) # index_user_histories_on_acting_user_id_and_action_and_id (acting_user_id,action,id)
# index_user_histories_on_action_and_id (action,id)
# index_user_histories_on_category_id (category_id) # index_user_histories_on_category_id (category_id)
# index_user_histories_on_subject_and_id (subject,id)
# index_user_histories_on_target_user_id_and_id (target_user_id,id)
# index_user_histories_on_topic_id_and_target_user_id_and_action (topic_id,target_user_id,action) # index_user_histories_on_topic_id_and_target_user_id_and_action (topic_id,target_user_id,action)
# #

View File

@ -47,3 +47,31 @@ class UserNotificationSchedule < ActiveRecord::Base
end end
end end
end end
# == Schema Information
#
# Table name: user_notification_schedules
#
# id :bigint not null, primary key
# user_id :integer not null
# enabled :boolean default(FALSE), not null
# day_0_start_time :integer not null
# day_0_end_time :integer not null
# day_1_start_time :integer not null
# day_1_end_time :integer not null
# day_2_start_time :integer not null
# day_2_end_time :integer not null
# day_3_start_time :integer not null
# day_3_end_time :integer not null
# day_4_start_time :integer not null
# day_4_end_time :integer not null
# day_5_start_time :integer not null
# day_5_end_time :integer not null
# day_6_start_time :integer not null
# day_6_end_time :integer not null
#
# Indexes
#
# index_user_notification_schedules_on_enabled (enabled)
# index_user_notification_schedules_on_user_id (user_id)
#

View File

@ -210,6 +210,7 @@ end
# external_links_in_new_tab :boolean default(FALSE), not null # external_links_in_new_tab :boolean default(FALSE), not null
# enable_quoting :boolean default(TRUE), not null # enable_quoting :boolean default(TRUE), not null
# dynamic_favicon :boolean default(FALSE), not null # dynamic_favicon :boolean default(FALSE), not null
# disable_jump_reply :boolean default(FALSE), not null
# automatically_unpin_topics :boolean default(TRUE), not null # automatically_unpin_topics :boolean default(TRUE), not null
# digest_after_minutes :integer # digest_after_minutes :integer
# auto_track_topics_after_msecs :integer # auto_track_topics_after_msecs :integer