From c2e45c837759279e7d01e880b78950cb42606040 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Mon, 11 Jan 2016 17:30:56 +1100 Subject: [PATCH] Update annotate and annotate models --- Gemfile.lock | 4 ++-- app/models/category.rb | 1 + app/models/category_user.rb | 5 +++++ app/models/group.rb | 5 ++++- app/models/group_archived_message.rb | 15 +++++++++++++++ app/models/group_mention.rb | 16 ++++++++++++++++ app/models/group_user.rb | 13 +++++++------ app/models/translation_override.rb | 16 ++++++++++++++++ app/models/user.rb | 1 + app/models/user_archived_message.rb | 15 +++++++++++++++ 10 files changed, 82 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 120c0a64d..edd7ca733 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -38,8 +38,8 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - annotate (2.6.10) - activerecord (>= 3.2, <= 4.3) + annotate (2.7.0) + activerecord (>= 3.2, < 6.0) rake (~> 10.4) arel (6.0.3) aws-sdk (2.1.29) diff --git a/app/models/category.rb b/app/models/category.rb index 0ee810e64..7ada616b8 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -474,6 +474,7 @@ end # auto_close_based_on_last_post :boolean default(FALSE) # topic_template :text # suppress_from_homepage :boolean default(FALSE) +# contains_messages :boolean default(FALSE), not null # # Indexes # diff --git a/app/models/category_user.rb b/app/models/category_user.rb index cd7b719af..2922b6858 100644 --- a/app/models/category_user.rb +++ b/app/models/category_user.rb @@ -108,3 +108,8 @@ end # user_id :integer not null # notification_level :integer not null # +# Indexes +# +# idx_category_users_u1 (user_id,category_id,notification_level) UNIQUE +# idx_category_users_u2 (category_id,user_id,notification_level) UNIQUE +# diff --git a/app/models/group.rb b/app/models/group.rb index 925c3d709..a508335a7 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -442,8 +442,11 @@ end # primary_group :boolean default(FALSE), not null # title :string(255) # grant_trust_level :integer +# incoming_email :string +# has_messages :boolean default(FALSE), not null # # Indexes # -# index_groups_on_name (name) UNIQUE +# index_groups_on_incoming_email (incoming_email) UNIQUE +# index_groups_on_name (name) UNIQUE # diff --git a/app/models/group_archived_message.rb b/app/models/group_archived_message.rb index 7c346518e..b32092cb3 100644 --- a/app/models/group_archived_message.rb +++ b/app/models/group_archived_message.rb @@ -2,3 +2,18 @@ class GroupArchivedMessage < ActiveRecord::Base belongs_to :user belongs_to :topic end + +# == Schema Information +# +# Table name: group_archived_messages +# +# id :integer not null, primary key +# group_id :integer not null +# topic_id :integer not null +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_group_archived_messages_on_group_id_and_topic_id (group_id,topic_id) UNIQUE +# diff --git a/app/models/group_mention.rb b/app/models/group_mention.rb index 65faeb6f0..30eb647eb 100644 --- a/app/models/group_mention.rb +++ b/app/models/group_mention.rb @@ -2,3 +2,19 @@ class GroupMention < ActiveRecord::Base belongs_to :post belongs_to :group end + +# == Schema Information +# +# Table name: group_mentions +# +# id :integer not null, primary key +# post_id :integer +# group_id :integer +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_group_mentions_on_group_id_and_post_id (group_id,post_id) UNIQUE +# index_group_mentions_on_post_id_and_group_id (post_id,group_id) UNIQUE +# diff --git a/app/models/group_user.rb b/app/models/group_user.rb index e3129ebc4..ddd0de85f 100644 --- a/app/models/group_user.rb +++ b/app/models/group_user.rb @@ -61,12 +61,13 @@ end # # Table name: group_users # -# 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 -# owner :boolean default(FALSE), not null +# 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 +# owner :boolean default(FALSE), not null +# notification_level :integer default(3), not null # # Indexes # diff --git a/app/models/translation_override.rb b/app/models/translation_override.rb index a433605e8..3046832e6 100644 --- a/app/models/translation_override.rb +++ b/app/models/translation_override.rb @@ -22,3 +22,19 @@ class TranslationOverride < ActiveRecord::Base end end + +# == Schema Information +# +# Table name: translation_overrides +# +# id :integer not null, primary key +# locale :string not null +# translation_key :string not null +# value :string not null +# created_at :datetime not null +# updated_at :datetime not null +# +# Indexes +# +# index_translation_overrides_on_locale_and_translation_key (locale,translation_key) UNIQUE +# diff --git a/app/models/user.rb b/app/models/user.rb index 0c2d99896..0d81fa1b9 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1091,6 +1091,7 @@ end # edit_history_public :boolean default(FALSE), not null # trust_level_locked :boolean default(FALSE), not null # staged :boolean default(FALSE), not null +# automatically_unpin_topics :boolean default(TRUE) # # Indexes # diff --git a/app/models/user_archived_message.rb b/app/models/user_archived_message.rb index b24c26b54..3f7c94e47 100644 --- a/app/models/user_archived_message.rb +++ b/app/models/user_archived_message.rb @@ -2,3 +2,18 @@ class UserArchivedMessage < ActiveRecord::Base belongs_to :user belongs_to :topic end + +# == Schema Information +# +# Table name: user_archived_messages +# +# id :integer not null, primary key +# user_id :integer not null +# topic_id :integer not null +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_user_archived_messages_on_user_id_and_topic_id (user_id,topic_id) UNIQUE +#