From 236d8193bdce5a7b8e071eba7fcf9b25d83f59b5 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 28 Mar 2016 15:21:45 +1100 Subject: [PATCH] annotate models --- app/models/directory_item.rb | 2 +- app/models/email_change_request.rb | 19 +++++++++++++++++++ app/models/given_daily_like.rb | 15 +++++++++++++++ app/models/incoming_email.rb | 27 ++++++++++++++------------- app/models/instagram_user_info.rb | 12 ++++++++++++ app/models/user_option.rb | 5 ++++- 6 files changed, 65 insertions(+), 15 deletions(-) diff --git a/app/models/directory_item.rb b/app/models/directory_item.rb index c34477384cd..4ada2343ec2 100644 --- a/app/models/directory_item.rb +++ b/app/models/directory_item.rb @@ -160,5 +160,5 @@ end # # Indexes # -# index_directory_items_on_period_type (period_type) +# index_directory_items_on_period_type_and_user_id (period_type,user_id) UNIQUE # diff --git a/app/models/email_change_request.rb b/app/models/email_change_request.rb index 64d1fa104f8..229b858d470 100644 --- a/app/models/email_change_request.rb +++ b/app/models/email_change_request.rb @@ -7,3 +7,22 @@ class EmailChangeRequest < ActiveRecord::Base end end + +# == Schema Information +# +# Table name: email_change_requests +# +# id :integer not null, primary key +# user_id :integer not null +# old_email :string not null +# new_email :string not null +# old_email_token_id :integer +# new_email_token_id :integer +# change_state :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# +# Indexes +# +# index_email_change_requests_on_user_id (user_id) +# diff --git a/app/models/given_daily_like.rb b/app/models/given_daily_like.rb index 38161e0eb5d..87da4194537 100644 --- a/app/models/given_daily_like.rb +++ b/app/models/given_daily_like.rb @@ -32,3 +32,18 @@ class GivenDailyLike < ActiveRecord::Base .update_all(limit_reached: false) end end + +# == Schema Information +# +# Table name: given_daily_likes +# +# user_id :integer not null +# likes_given :integer not null +# given_date :date not null +# limit_reached :boolean default(FALSE), not null +# +# Indexes +# +# index_given_daily_likes_on_limit_reached_and_user_id (limit_reached,user_id) +# index_given_daily_likes_on_user_id_and_given_date (user_id,given_date) UNIQUE +# diff --git a/app/models/incoming_email.rb b/app/models/incoming_email.rb index 1ba3fb88c3f..416cc3afc5b 100644 --- a/app/models/incoming_email.rb +++ b/app/models/incoming_email.rb @@ -10,19 +10,20 @@ end # # Table name: incoming_emails # -# id :integer not null, primary key -# user_id :integer -# topic_id :integer -# post_id :integer -# raw :text -# error :text -# message_id :text -# from_address :text -# to_addresses :text -# cc_addresses :text -# subject :text -# created_at :datetime not null -# updated_at :datetime not null +# id :integer not null, primary key +# user_id :integer +# topic_id :integer +# post_id :integer +# raw :text +# error :text +# message_id :text +# from_address :text +# to_addresses :text +# cc_addresses :text +# subject :text +# created_at :datetime not null +# updated_at :datetime not null +# rejection_message :text # # Indexes # diff --git a/app/models/instagram_user_info.rb b/app/models/instagram_user_info.rb index c16a432934f..d2ac28ffcd4 100644 --- a/app/models/instagram_user_info.rb +++ b/app/models/instagram_user_info.rb @@ -3,3 +3,15 @@ class InstagramUserInfo < ActiveRecord::Base belongs_to :user end + +# == Schema Information +# +# Table name: instagram_user_infos +# +# id :integer not null, primary key +# user_id :integer +# screen_name :string +# instagram_user_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# diff --git a/app/models/user_option.rb b/app/models/user_option.rb index 715b98e0c7a..d986a2885b6 100644 --- a/app/models/user_option.rb +++ b/app/models/user_option.rb @@ -146,7 +146,10 @@ end # auto_track_topics_after_msecs :integer # new_topic_duration_minutes :integer # last_redirected_to_top_at :datetime -# email_previous_replies :integer default(1), not null +# email_previous_replies :integer default(2), not null +# email_in_reply_to :boolean default(TRUE), not null +# like_notification_frequency :integer default(1), not null +# include_tl0_in_digests :boolean default(FALSE) # # Indexes #