diff --git a/app/models/badge.rb b/app/models/badge.rb index 72dabe630f4..818b4dfae3e 100644 --- a/app/models/badge.rb +++ b/app/models/badge.rb @@ -361,6 +361,7 @@ end # show_posts :boolean default(FALSE), not null # system :boolean default(FALSE), not null # image :string(255) +# long_description :text # # Indexes # diff --git a/app/models/category.rb b/app/models/category.rb index 311f3fad506..7e550aef28c 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -455,6 +455,8 @@ end # allow_badges :boolean default(TRUE), not null # name_lower :string(50) not null # auto_close_based_on_last_post :boolean default(FALSE) +# topic_template :text +# suppress_from_homepage :boolean default(FALSE) # # Indexes # diff --git a/app/models/digest_unsubscribe_key.rb b/app/models/digest_unsubscribe_key.rb index 5f48e181e75..34ed72fd10f 100644 --- a/app/models/digest_unsubscribe_key.rb +++ b/app/models/digest_unsubscribe_key.rb @@ -17,3 +17,17 @@ class DigestUnsubscribeKey < ActiveRecord::Base self.key = SecureRandom.hex(32) end end + +# == Schema Information +# +# Table name: digest_unsubscribe_keys +# +# key :string(64) not null, primary key +# user_id :integer not null +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_digest_unsubscribe_keys_on_created_at (created_at) +# diff --git a/app/models/directory_item.rb b/app/models/directory_item.rb index 8e6ad2d2ce6..6e21ca7bad4 100644 --- a/app/models/directory_item.rb +++ b/app/models/directory_item.rb @@ -73,3 +73,25 @@ class DirectoryItem < ActiveRecord::Base end end end + +# == Schema Information +# +# Table name: directory_items +# +# id :integer not null, primary key +# period_type :integer not null +# user_id :integer not null +# likes_received :integer not null +# likes_given :integer not null +# topics_entered :integer not null +# topic_count :integer not null +# post_count :integer not null +# created_at :datetime +# updated_at :datetime +# days_visited :integer default(0), not null +# posts_read :integer default(0), not null +# +# Indexes +# +# index_directory_items_on_period_type (period_type) +# diff --git a/app/models/draft.rb b/app/models/draft.rb index 27378ea05ef..2e90ba445f9 100644 --- a/app/models/draft.rb +++ b/app/models/draft.rb @@ -64,6 +64,7 @@ end # created_at :datetime not null # updated_at :datetime not null # sequence :integer default(0), not null +# revisions :integer default(1), not null # # Indexes # diff --git a/app/models/embeddable_host.rb b/app/models/embeddable_host.rb index 1fdda54e280..822f8a8ea2f 100644 --- a/app/models/embeddable_host.rb +++ b/app/models/embeddable_host.rb @@ -22,3 +22,14 @@ class EmbeddableHost < ActiveRecord::Base end end + +# == Schema Information +# +# Table name: embeddable_hosts +# +# id :integer not null, primary key +# host :string(255) not null +# category_id :integer not null +# created_at :datetime +# updated_at :datetime +# diff --git a/app/models/group.rb b/app/models/group.rb index bdd3ca82e31..27959ac7280 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -372,6 +372,8 @@ end # visible :boolean default(TRUE), not null # automatic_membership_email_domains :text # automatic_membership_retroactive :boolean default(FALSE) +# primary_group :boolean default(FALSE), not null +# title :string(255) # grant_trust_level :integer # # Indexes diff --git a/app/models/group_manager.rb b/app/models/group_manager.rb index a30d523f51d..009f07446db 100644 --- a/app/models/group_manager.rb +++ b/app/models/group_manager.rb @@ -10,8 +10,8 @@ end # id :integer not null, primary key # group_id :integer not null # user_id :integer not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # diff --git a/app/models/muted_user.rb b/app/models/muted_user.rb index a60b30202b3..59f8089c6f7 100644 --- a/app/models/muted_user.rb +++ b/app/models/muted_user.rb @@ -2,3 +2,19 @@ class MutedUser < ActiveRecord::Base belongs_to :user belongs_to :muted_user, class_name: 'User' end + +# == Schema Information +# +# Table name: muted_users +# +# id :integer not null, primary key +# user_id :integer not null +# muted_user_id :integer not null +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_muted_users_on_muted_user_id_and_user_id (muted_user_id,user_id) UNIQUE +# index_muted_users_on_user_id_and_muted_user_id (user_id,muted_user_id) UNIQUE +# diff --git a/app/models/notification.rb b/app/models/notification.rb index e142f57b2ea..61da20b0cfb 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -164,6 +164,8 @@ end # # Indexes # -# index_notifications_on_post_action_id (post_action_id) -# index_notifications_on_user_id_and_created_at (user_id,created_at) +# idx_notifications_speedup_unread_count (user_id,notification_type) +# 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_topic_id_and_post_number (user_id,topic_id,post_number) # diff --git a/app/models/post.rb b/app/models/post.rb index 3cf1fb367d2..fc2e7e2179b 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -644,6 +644,7 @@ end # via_email :boolean default(FALSE), not null # raw_email :text # public_version :integer default(1), not null +# action_code :string(255) # # Indexes # diff --git a/app/models/post_action.rb b/app/models/post_action.rb index 90c25b715c0..d1875b6e95c 100644 --- a/app/models/post_action.rb +++ b/app/models/post_action.rb @@ -551,7 +551,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 -# index_post_actions_on_post_id (post_id) +# idx_unique_actions (user_id,post_action_type_id,post_id,targets_topic) UNIQUE +# idx_unique_flags (user_id,post_id,targets_topic) UNIQUE +# 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) # diff --git a/app/models/post_custom_field.rb b/app/models/post_custom_field.rb index 39df0288edc..713d0affbc8 100644 --- a/app/models/post_custom_field.rb +++ b/app/models/post_custom_field.rb @@ -15,5 +15,6 @@ end # # Indexes # +# index_post_custom_fields_on_name_and_value (name) # index_post_custom_fields_on_post_id_and_name (post_id,name) # diff --git a/app/models/post_stat.rb b/app/models/post_stat.rb index b9b97acb20e..ec293b66636 100644 --- a/app/models/post_stat.rb +++ b/app/models/post_stat.rb @@ -1,3 +1,20 @@ class PostStat < ActiveRecord::Base belongs_to :post end + +# == Schema Information +# +# Table name: post_stats +# +# id :integer not null, primary key +# post_id :integer +# drafts_saved :integer +# typing_duration_msecs :integer +# composer_open_duration_msecs :integer +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_post_stats_on_post_id (post_id) +# diff --git a/app/models/queued_post.rb b/app/models/queued_post.rb index e0199bd137f..fa1f4112085 100644 --- a/app/models/queued_post.rb +++ b/app/models/queued_post.rb @@ -108,3 +108,27 @@ class QueuedPost < ActiveRecord::Base end end + +# == Schema Information +# +# Table name: queued_posts +# +# id :integer not null, primary key +# queue :string(255) not null +# state :integer not null +# user_id :integer not null +# raw :text not null +# post_options :json not null +# topic_id :integer +# approved_by_id :integer +# approved_at :datetime +# rejected_by_id :integer +# rejected_at :datetime +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# by_queue_status (queue,state,created_at) +# by_queue_status_topic (topic_id,queue,state,created_at) +# diff --git a/app/models/site_customization.rb b/app/models/site_customization.rb index ad04f261c55..45397f6ab58 100644 --- a/app/models/site_customization.rb +++ b/app/models/site_customization.rb @@ -192,6 +192,8 @@ end # body_tag :text # top :text # mobile_top :text +# embedded_css :text +# embedded_css_baked :text # # Indexes # diff --git a/app/models/stylesheet_cache.rb b/app/models/stylesheet_cache.rb index 76526dd52a9..a5397ef1590 100644 --- a/app/models/stylesheet_cache.rb +++ b/app/models/stylesheet_cache.rb @@ -28,3 +28,19 @@ class StylesheetCache < ActiveRecord::Base end end + +# == Schema Information +# +# Table name: stylesheet_cache +# +# id :integer not null, primary key +# target :string(255) not null +# digest :string(255) not null +# content :text not null +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_stylesheet_cache_on_target_and_digest (target,digest) UNIQUE +# diff --git a/app/models/topic.rb b/app/models/topic.rb index ccd21de7557..af47aba1502 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -1043,11 +1043,15 @@ end # pinned_globally :boolean default(FALSE), not null # auto_close_based_on_last_post :boolean default(FALSE) # auto_close_hours :float +# pinned_until :datetime # # Indexes # -# idx_topics_front_page (deleted_at,visible,archetype,category_id,id) -# idx_topics_user_id_deleted_at (user_id) -# index_topics_on_bumped_at (bumped_at) -# 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_topics_on_bumped_at (bumped_at) +# index_topics_on_created_at_and_visible (created_at,visible) +# index_topics_on_id_and_deleted_at (id,deleted_at) +# index_topics_on_pinned_at (pinned_at) +# index_topics_on_pinned_globally (pinned_globally) # diff --git a/app/models/topic_embed.rb b/app/models/topic_embed.rb index 461695e5a01..8d8485232f3 100644 --- a/app/models/topic_embed.rb +++ b/app/models/topic_embed.rb @@ -169,7 +169,7 @@ end # id :integer not null, primary key # topic_id :integer not null # post_id :integer not null -# embed_url :string(255) not null +# embed_url :string(1000) not null # content_sha1 :string(40) # created_at :datetime not null # updated_at :datetime not null diff --git a/app/models/topic_link.rb b/app/models/topic_link.rb index d92cebf1552..3ed474d7c03 100644 --- a/app/models/topic_link.rb +++ b/app/models/topic_link.rb @@ -231,7 +231,8 @@ end # # Indexes # -# index_topic_links_on_post_id (post_id) -# index_topic_links_on_topic_id (topic_id) -# unique_post_links (topic_id,post_id,url) UNIQUE +# index_topic_links_on_link_post_id_and_reflection (link_post_id,reflection) +# index_topic_links_on_post_id (post_id) +# index_topic_links_on_topic_id (topic_id) +# unique_post_links (topic_id,post_id,url) UNIQUE # diff --git a/app/models/user.rb b/app/models/user.rb index 3dfb2ed3477..b9ca14e32c6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1038,7 +1038,7 @@ end # name :string(255) # seen_notification_id :integer default(0), not null # last_posted_at :datetime -# email :string(256) not null +# email :string(513) not null # password_hash :string(64) # salt :string(32) # active :boolean default(FALSE), not null @@ -1083,6 +1083,8 @@ end # # Indexes # +# idx_users_admin (id) +# idx_users_moderator (id) # index_users_on_auth_token (auth_token) # index_users_on_last_posted_at (last_posted_at) # index_users_on_last_seen_at (last_seen_at) diff --git a/app/models/user_action.rb b/app/models/user_action.rb index 30086d0064f..090a17754da 100644 --- a/app/models/user_action.rb +++ b/app/models/user_action.rb @@ -363,10 +363,13 @@ end # acting_user_id :integer # created_at :datetime not null # updated_at :datetime not null +# queued_post_id :integer # # Indexes # # 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) # index_user_actions_on_acting_user_id (acting_user_id) +# index_user_actions_on_target_post_id (target_post_id) # index_user_actions_on_user_id_and_action_type (user_id,action_type) # diff --git a/app/models/user_field.rb b/app/models/user_field.rb index e0607950984..c39644a6098 100644 --- a/app/models/user_field.rb +++ b/app/models/user_field.rb @@ -21,4 +21,5 @@ end # description :string(255) not null # required :boolean default(TRUE), not null # show_on_profile :boolean default(FALSE), not null +# position :integer default(0) # diff --git a/app/models/user_field_option.rb b/app/models/user_field_option.rb index b603fcaea5a..2b3036fa40d 100644 --- a/app/models/user_field_option.rb +++ b/app/models/user_field_option.rb @@ -1,2 +1,13 @@ class UserFieldOption < ActiveRecord::Base end + +# == Schema Information +# +# Table name: user_field_options +# +# id :integer not null, primary key +# user_field_id :integer not null +# value :string(255) not null +# created_at :datetime +# updated_at :datetime +# diff --git a/app/models/user_history.rb b/app/models/user_history.rb index 94f48adecdc..77867f7d466 100644 --- a/app/models/user_history.rb +++ b/app/models/user_history.rb @@ -143,6 +143,7 @@ end # topic_id :integer # admin_only :boolean default(FALSE) # post_id :integer +# custom_type :string(255) # # Indexes # diff --git a/app/models/user_visit.rb b/app/models/user_visit.rb index 2486da710d1..551361586e1 100644 --- a/app/models/user_visit.rb +++ b/app/models/user_visit.rb @@ -40,4 +40,5 @@ end # Indexes # # index_user_visits_on_user_id_and_visited_at (user_id,visited_at) UNIQUE +# index_user_visits_on_visited_at_and_mobile (visited_at,mobile) # diff --git a/lib/tasks/auto_annotate_models.rake b/lib/tasks/auto_annotate_models.rake index 4980a49c907..fb1be240b3f 100644 --- a/lib/tasks/auto_annotate_models.rake +++ b/lib/tasks/auto_annotate_models.rake @@ -19,6 +19,7 @@ if(Rails.env.development?) 'exclude_tests' => "true", 'exclude_fixtures' => "true", 'exclude_factories' => "true", + 'exclude_serializers' => "true", 'ignore_model_sub_dir' => "false", 'skip_on_db_migrate' => "true", 'format_bare' => "true",