From 5c148faeb9dafe7aa3c70496982c3a0b60c95fce Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 20 Mar 2014 15:35:51 +1100 Subject: [PATCH] annotations were out of date --- app/models/badge.rb | 3 +- app/models/category.rb | 53 ++++++++++++++++------------- app/models/email_log.rb | 22 ++++++------ app/models/post.rb | 1 + app/models/single_sign_on_record.rb | 19 +++++++++++ app/models/topic.rb | 9 ++--- app/models/user.rb | 3 ++ app/models/user_badge.rb | 1 - app/models/user_history.rb | 2 +- app/models/user_stat.rb | 2 +- 10 files changed, 72 insertions(+), 43 deletions(-) diff --git a/app/models/badge.rb b/app/models/badge.rb index f5dfbdc105b..72c3a4dc09b 100644 --- a/app/models/badge.rb +++ b/app/models/badge.rb @@ -19,6 +19,5 @@ end # # Indexes # -# index_badges_on_badge_type_id (badge_type_id) -# index_badges_on_name (name) UNIQUE +# index_badges_on_name (name) UNIQUE # diff --git a/app/models/category.rb b/app/models/category.rb index a4b1e9af7a4..e435e0d3de8 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -325,33 +325,38 @@ end # # Table name: categories # -# id :integer not null, primary key -# name :string(50) not null -# color :string(6) default("AB9364"), not null -# topic_id :integer -# topic_count :integer default(0), not null -# created_at :datetime not null -# updated_at :datetime not null -# user_id :integer not null -# topics_year :integer -# topics_month :integer -# topics_week :integer -# slug :string(255) not null -# description :text -# text_color :string(6) default("FFFFFF"), not null -# read_restricted :boolean default(FALSE), not null -# auto_close_hours :float -# post_count :integer default(0), not null -# latest_post_id :integer -# latest_topic_id :integer -# position :integer -# parent_category_id :integer -# posts_year :integer -# posts_month :integer -# posts_week :integer +# id :integer not null, primary key +# name :string(50) not null +# color :string(6) default("AB9364"), not null +# topic_id :integer +# topic_count :integer default(0), not null +# created_at :datetime not null +# updated_at :datetime not null +# user_id :integer not null +# topics_year :integer default(0) +# topics_month :integer default(0) +# topics_week :integer default(0) +# slug :string(255) not null +# description :text +# text_color :string(6) default("FFFFFF"), not null +# read_restricted :boolean default(FALSE), not null +# auto_close_hours :float +# post_count :integer default(0), not null +# latest_post_id :integer +# latest_topic_id :integer +# position :integer +# parent_category_id :integer +# posts_year :integer default(0) +# posts_month :integer default(0) +# posts_week :integer default(0) +# email_in :string(255) +# email_in_allow_strangers :boolean default(FALSE) +# topics_day :integer default(0) +# posts_day :integer default(0) # # Indexes # +# index_categories_on_email_in (email_in) UNIQUE # index_categories_on_forum_thread_count (topic_count) # index_categories_on_name (name) UNIQUE # diff --git a/app/models/email_log.rb b/app/models/email_log.rb index 9318dc0b018..a187f6800ea 100644 --- a/app/models/email_log.rb +++ b/app/models/email_log.rb @@ -33,20 +33,22 @@ end # # Table name: email_logs # -# id :integer not null, primary key -# to_address :string(255) not null -# email_type :string(255) not null -# user_id :integer -# created_at :datetime not null -# updated_at :datetime not null -# reply_key :string(32) -# post_id :integer -# topic_id :integer +# id :integer not null, primary key +# to_address :string(255) not null +# email_type :string(255) not null +# user_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# reply_key :string(32) +# post_id :integer +# topic_id :integer +# skipped :boolean default(FALSE) +# skipped_reason :string(255) # # Indexes # # index_email_logs_on_created_at (created_at) # index_email_logs_on_reply_key (reply_key) +# index_email_logs_on_skipped_and_created_at (skipped,created_at) # index_email_logs_on_user_id_and_created_at (user_id,created_at) # - diff --git a/app/models/post.rb b/app/models/post.rb index 036cc93b266..297c910a9b5 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -540,6 +540,7 @@ end # # Indexes # +# idx_posts_created_at_topic_id (created_at,topic_id) # 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 diff --git a/app/models/single_sign_on_record.rb b/app/models/single_sign_on_record.rb index 7b9e7ecffd2..e58d174093f 100644 --- a/app/models/single_sign_on_record.rb +++ b/app/models/single_sign_on_record.rb @@ -1,3 +1,22 @@ class SingleSignOnRecord < ActiveRecord::Base belongs_to :user end + +# == Schema Information +# +# Table name: single_sign_on_records +# +# id :integer not null, primary key +# user_id :integer not null +# external_id :string(255) not null +# last_payload :text not null +# created_at :datetime +# updated_at :datetime +# external_username :string(255) +# external_email :string(255) +# external_name :string(255) +# +# Indexes +# +# index_single_sign_on_records_on_external_id (external_id) UNIQUE +# diff --git a/app/models/topic.rb b/app/models/topic.rb index 34dcd725c9a..249ff9371e7 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -772,11 +772,12 @@ end # deleted_by_id :integer # participant_count :integer default(1) # word_count :integer +# excerpt :string(1000) # # Indexes # -# idx_topics_user_id_deleted_at (user_id) -# index_forum_threads_on_bumped_at (bumped_at) -# index_topics_on_deleted_at_and_visible_and_archetype_and_id (deleted_at,visible,archetype,id) -# index_topics_on_id_and_deleted_at (id,deleted_at) +# idx_topics_front_page (deleted_at,visible,archetype,category_id,id) +# idx_topics_user_id_deleted_at (user_id) +# index_forum_threads_on_bumped_at (bumped_at) +# index_topics_on_id_and_deleted_at (id,deleted_at) # diff --git a/app/models/user.rb b/app/models/user.rb index f206018d486..233539359e9 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -723,6 +723,9 @@ end # uploaded_avatar_id :integer # email_always :boolean default(FALSE), not null # mailing_list_mode :boolean default(FALSE), not null +# primary_group_id :integer +# locale :string(10) +# profile_background :string(255) # # Indexes # diff --git a/app/models/user_badge.rb b/app/models/user_badge.rb index e62c3e0db96..edf24521eb4 100644 --- a/app/models/user_badge.rb +++ b/app/models/user_badge.rb @@ -22,5 +22,4 @@ end # Indexes # # index_user_badges_on_badge_id_and_user_id (badge_id,user_id) UNIQUE -# index_user_badges_on_user_id (user_id) # diff --git a/app/models/user_history.rb b/app/models/user_history.rb index 6747a284261..fccf90cc298 100644 --- a/app/models/user_history.rb +++ b/app/models/user_history.rb @@ -109,6 +109,7 @@ end # previous_value :text # new_value :text # topic_id :integer +# admin_only :boolean default(FALSE) # # Indexes # @@ -117,4 +118,3 @@ end # 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) # - diff --git a/app/models/user_stat.rb b/app/models/user_stat.rb index 2fde3217927..094043205c5 100644 --- a/app/models/user_stat.rb +++ b/app/models/user_stat.rb @@ -93,5 +93,5 @@ end # likes_given :integer default(0), not null # likes_received :integer default(0), not null # topic_reply_count :integer default(0), not null +# new_since :datetime not null # -