diff --git a/app/models/api_key.rb b/app/models/api_key.rb index dc6195baeb1..04fb0aee877 100644 --- a/app/models/api_key.rb +++ b/app/models/api_key.rb @@ -29,8 +29,8 @@ end # key :string(64) not null # user_id :integer # created_by_id :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # diff --git a/app/models/category.rb b/app/models/category.rb index 7c7b13a0585..980aea83991 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -333,8 +333,8 @@ end # 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 +# created_at :datetime +# updated_at :datetime # user_id :integer not null # topics_year :integer default(0) # topics_month :integer default(0) @@ -359,7 +359,7 @@ end # # Indexes # -# index_categories_on_email_in (email_in) UNIQUE -# index_categories_on_forum_thread_count (topic_count) -# index_categories_on_name (name) UNIQUE +# index_categories_on_email_in (email_in) UNIQUE +# index_categories_on_parent_category_id_and_name (parent_category_id,name) UNIQUE +# index_categories_on_topic_count (topic_count) # diff --git a/app/models/category_featured_topic.rb b/app/models/category_featured_topic.rb index 77fdbb0db90..2324a9fd3ab 100644 --- a/app/models/category_featured_topic.rb +++ b/app/models/category_featured_topic.rb @@ -52,8 +52,8 @@ end # # category_id :integer not null # topic_id :integer not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # rank :integer default(0), not null # id :integer not null, primary key # diff --git a/app/models/category_featured_user.rb b/app/models/category_featured_user.rb index db524db0b89..50656dd13fd 100644 --- a/app/models/category_featured_user.rb +++ b/app/models/category_featured_user.rb @@ -53,8 +53,8 @@ end # id :integer not null, primary key # category_id :integer # user_id :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # diff --git a/app/models/category_group.rb b/app/models/category_group.rb index fa9fd3a21e7..d7f70007b69 100644 --- a/app/models/category_group.rb +++ b/app/models/category_group.rb @@ -15,7 +15,7 @@ end # id :integer not null, primary key # category_id :integer not null # group_id :integer not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # permission_type :integer default(1) # diff --git a/app/models/draft.rb b/app/models/draft.rb index a0c15f63a95..2a881f39102 100644 --- a/app/models/draft.rb +++ b/app/models/draft.rb @@ -46,8 +46,8 @@ end # user_id :integer not null # draft_key :string(255) not null # data :text not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # sequence :integer default(0), not null # # Indexes diff --git a/app/models/email_log.rb b/app/models/email_log.rb index 08a9e9615a4..067069e5e51 100644 --- a/app/models/email_log.rb +++ b/app/models/email_log.rb @@ -37,8 +37,8 @@ end # 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 +# created_at :datetime +# updated_at :datetime # reply_key :string(32) # post_id :integer # topic_id :integer diff --git a/app/models/email_token.rb b/app/models/email_token.rb index 2dd30c1a412..97bac40f151 100644 --- a/app/models/email_token.rb +++ b/app/models/email_token.rb @@ -73,8 +73,8 @@ end # token :string(255) not null # confirmed :boolean default(FALSE), not null # expired :boolean default(FALSE), not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # diff --git a/app/models/facebook_user_info.rb b/app/models/facebook_user_info.rb index 8ef00720e4e..e2f10a26847 100644 --- a/app/models/facebook_user_info.rb +++ b/app/models/facebook_user_info.rb @@ -16,8 +16,8 @@ end # gender :string(255) # name :string(255) # link :string(255) -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # diff --git a/app/models/github_user_info.rb b/app/models/github_user_info.rb index c79a3b0e913..1b4349313a8 100644 --- a/app/models/github_user_info.rb +++ b/app/models/github_user_info.rb @@ -10,8 +10,8 @@ end # user_id :integer not null # screen_name :string(255) not null # github_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/google_user_info.rb b/app/models/google_user_info.rb index f48416dda46..6c4011142cf 100644 --- a/app/models/google_user_info.rb +++ b/app/models/google_user_info.rb @@ -1,3 +1,27 @@ class GoogleUserInfo < ActiveRecord::Base belongs_to :user end + +# == Schema Information +# +# Table name: google_user_infos +# +# id :integer not null, primary key +# user_id :integer not null +# google_user_id :string(255) not null +# first_name :string(255) +# last_name :string(255) +# email :string(255) +# gender :string(255) +# name :string(255) +# link :string(255) +# profile_link :string(255) +# picture :string(255) +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_google_user_infos_on_google_user_id (google_user_id) UNIQUE +# index_google_user_infos_on_user_id (user_id) UNIQUE +# diff --git a/app/models/group.rb b/app/models/group.rb index 8b920e13345..b4365ccf627 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -256,8 +256,8 @@ end # # id :integer not null, primary key # name :string(255) not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # automatic :boolean default(FALSE), not null # user_count :integer default(0), not null # alias_level :integer default(0) diff --git a/app/models/group_user.rb b/app/models/group_user.rb index 53ace2df1fd..1a0a0cc5a00 100644 --- a/app/models/group_user.rb +++ b/app/models/group_user.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/incoming_link.rb b/app/models/incoming_link.rb index 21f8394e47a..99823b976e9 100644 --- a/app/models/incoming_link.rb +++ b/app/models/incoming_link.rb @@ -104,8 +104,8 @@ end # domain :string(100) # topic_id :integer # post_number :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # user_id :integer # ip_address :inet # current_user_id :integer diff --git a/app/models/invite.rb b/app/models/invite.rb index c42405c5a00..83a001c1099 100644 --- a/app/models/invite.rb +++ b/app/models/invite.rb @@ -141,8 +141,8 @@ end # invited_by_id :integer not null # user_id :integer # redeemed_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # deleted_at :datetime # deleted_by_id :integer # invalidated_at :datetime diff --git a/app/models/notification.rb b/app/models/notification.rb index 55ebdcae66b..1ae54913bc9 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -143,8 +143,8 @@ end # user_id :integer not null # data :string(1000) not null # read :boolean default(FALSE), not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # topic_id :integer # post_number :integer # post_action_id :integer diff --git a/app/models/oauth2_user_info.rb b/app/models/oauth2_user_info.rb index 7ce0cace41d..a3034b00a08 100644 --- a/app/models/oauth2_user_info.rb +++ b/app/models/oauth2_user_info.rb @@ -13,8 +13,8 @@ end # provider :string(255) not null # email :string(255) # name :string(255) -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # diff --git a/app/models/post.rb b/app/models/post.rb index 753b4b28a8b..629fc48b1be 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -516,8 +516,8 @@ end # post_number :integer not null # raw :text not null # cooked :text not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # reply_to_post_number :integer # reply_count :integer default(0), not null # quote_count :integer default(0), not null @@ -557,5 +557,5 @@ end # 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 +# index_posts_on_topic_id_and_post_number (topic_id,post_number) # diff --git a/app/models/post_action.rb b/app/models/post_action.rb index e95ec5e79be..6e20b953534 100644 --- a/app/models/post_action.rb +++ b/app/models/post_action.rb @@ -341,8 +341,8 @@ end # user_id :integer not null # post_action_type_id :integer not null # deleted_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # deleted_by_id :integer # message :text # related_post_id :integer diff --git a/app/models/post_action_type.rb b/app/models/post_action_type.rb index 54dd103dee7..90b7f330ffc 100644 --- a/app/models/post_action_type.rb +++ b/app/models/post_action_type.rb @@ -45,8 +45,8 @@ end # name_key :string(50) not null # is_flag :boolean default(FALSE), not null # icon :string(20) -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # id :integer not null, primary key # position :integer default(0), not null # diff --git a/app/models/post_detail.rb b/app/models/post_detail.rb index 8f888516732..2fd28b1f1e8 100644 --- a/app/models/post_detail.rb +++ b/app/models/post_detail.rb @@ -14,8 +14,8 @@ end # key :string(255) # value :string(255) # extra :text -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # diff --git a/app/models/post_reply.rb b/app/models/post_reply.rb index 81c39269d15..d7de2240d9f 100644 --- a/app/models/post_reply.rb +++ b/app/models/post_reply.rb @@ -11,8 +11,8 @@ end # # post_id :integer # reply_id :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # diff --git a/app/models/screened_email.rb b/app/models/screened_email.rb index 0dd2cc1858d..f10c80a8bed 100644 --- a/app/models/screened_email.rb +++ b/app/models/screened_email.rb @@ -33,12 +33,12 @@ end # action_type :integer not null # match_count :integer default(0), not null # last_match_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # ip_address :inet # # Indexes # -# index_blocked_emails_on_email (email) UNIQUE -# index_blocked_emails_on_last_match_at (last_match_at) +# index_screened_emails_on_email (email) UNIQUE +# index_screened_emails_on_last_match_at (last_match_at) # diff --git a/app/models/screened_ip_address.rb b/app/models/screened_ip_address.rb index c5f80fefd02..4787673ebe6 100644 --- a/app/models/screened_ip_address.rb +++ b/app/models/screened_ip_address.rb @@ -92,8 +92,8 @@ end # action_type :integer not null # match_count :integer default(0), not null # last_match_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # diff --git a/app/models/screened_url.rb b/app/models/screened_url.rb index 5abe8aced91..3b543c7d77c 100644 --- a/app/models/screened_url.rb +++ b/app/models/screened_url.rb @@ -47,8 +47,8 @@ end # action_type :integer not null # match_count :integer default(0), not null # last_match_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # ip_address :inet # # Indexes diff --git a/app/models/site_content.rb b/app/models/site_content.rb index c346be4153c..969eaae3b29 100644 --- a/app/models/site_content.rb +++ b/app/models/site_content.rb @@ -38,8 +38,8 @@ end # # content_type :string(255) not null, primary key # content :text not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # diff --git a/app/models/site_customization.rb b/app/models/site_customization.rb index de2f7e97066..7217f0b6dcc 100644 --- a/app/models/site_customization.rb +++ b/app/models/site_customization.rb @@ -202,8 +202,8 @@ end # user_id :integer not null # enabled :boolean not null # key :string(255) not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # override_default_style :boolean default(FALSE), not null # stylesheet_baked :text default(""), not null # mobile_stylesheet :text diff --git a/app/models/site_setting.rb b/app/models/site_setting.rb index a1f03cca931..a457b336854 100644 --- a/app/models/site_setting.rb +++ b/app/models/site_setting.rb @@ -104,6 +104,6 @@ end # name :string(255) not null # data_type :integer not null # value :text -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # diff --git a/app/models/topic.rb b/app/models/topic.rb index 7afb405ca4e..2eb8e220297 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -806,8 +806,8 @@ end # id :integer not null, primary key # title :string(255) not null # last_posted_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # views :integer default(0), not null # posts_count :integer default(0), not null # user_id :integer @@ -858,6 +858,6 @@ end # # 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_bumped_at (bumped_at) # index_topics_on_id_and_deleted_at (id,deleted_at) # diff --git a/app/models/topic_allowed_user.rb b/app/models/topic_allowed_user.rb index 4bb981d226c..24f15544897 100644 --- a/app/models/topic_allowed_user.rb +++ b/app/models/topic_allowed_user.rb @@ -12,8 +12,8 @@ end # id :integer not null, primary key # user_id :integer not null # topic_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/topic_invite.rb b/app/models/topic_invite.rb index d6896c6502c..2536d12530b 100644 --- a/app/models/topic_invite.rb +++ b/app/models/topic_invite.rb @@ -15,8 +15,8 @@ end # id :integer not null, primary key # topic_id :integer not null # invite_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/topic_link.rb b/app/models/topic_link.rb index 87455435e4d..73fa8931e35 100644 --- a/app/models/topic_link.rb +++ b/app/models/topic_link.rb @@ -210,8 +210,8 @@ end # domain :string(100) not null # internal :boolean default(FALSE), not null # link_topic_id :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # reflection :boolean default(FALSE) # clicks :integer default(0), not null # link_post_id :integer @@ -220,6 +220,6 @@ end # # Indexes # -# index_forum_thread_links_on_forum_thread_id (topic_id) -# index_forum_thread_links_on_forum_thread_id_and_post_id_and_url (topic_id,post_id,url) UNIQUE +# index_topic_links_on_topic_id (topic_id) +# unique_post_links (topic_id,post_id,url) UNIQUE # diff --git a/app/models/topic_link_click.rb b/app/models/topic_link_click.rb index 0e5f2144bff..e85cccd9eba 100644 --- a/app/models/topic_link_click.rb +++ b/app/models/topic_link_click.rb @@ -58,11 +58,11 @@ end # id :integer not null, primary key # topic_link_id :integer not null # user_id :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # ip_address :inet not null # # Indexes # -# index_forum_thread_link_clicks_on_forum_thread_link_id (topic_link_id) +# by_link (topic_link_id) # diff --git a/app/models/topic_user.rb b/app/models/topic_user.rb index dbe5b3313b5..15f18b1fcb8 100644 --- a/app/models/topic_user.rb +++ b/app/models/topic_user.rb @@ -279,5 +279,5 @@ end # # 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 # diff --git a/app/models/twitter_user_info.rb b/app/models/twitter_user_info.rb index 42d4f4d83cf..cbb5c4c21c6 100644 --- a/app/models/twitter_user_info.rb +++ b/app/models/twitter_user_info.rb @@ -10,8 +10,8 @@ end # user_id :integer not null # screen_name :string(255) not null # twitter_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/upload.rb b/app/models/upload.rb index ea5581af949..03a965306c2 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -128,8 +128,8 @@ end # width :integer # height :integer # url :string(255) not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # sha1 :string(40) # origin :string(1000) # diff --git a/app/models/user.rb b/app/models/user.rb index 16af29d17b0..20d57846518 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -754,8 +754,8 @@ end # # id :integer not null, primary key # username :string(60) not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # name :string(255) # bio_raw :text # seen_notification_id :integer default(0), not null @@ -803,6 +803,7 @@ end # profile_background :string(255) # registration_ip_address :inet # last_redirected_to_top_at :datetime +# disable_jump_reply :boolean default(FALSE), not null # # Indexes # diff --git a/app/models/user_action.rb b/app/models/user_action.rb index 85dcd722301..ca6c5c2a6ca 100644 --- a/app/models/user_action.rb +++ b/app/models/user_action.rb @@ -334,12 +334,12 @@ end # target_post_id :integer # target_user_id :integer # acting_user_id :integer -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # # Indexes # -# idx_unique_rows (action_type,user_id,target_topic_id,target_post_id,acting_user_id) UNIQUE -# index_actions_on_acting_user_id (acting_user_id) -# index_actions_on_user_id_and_action_type (user_id,action_type) +# idx_unique_rows (action_type,user_id,target_topic_id,target_post_id,acting_user_id) UNIQUE +# index_user_actions_on_acting_user_id (acting_user_id) +# index_user_actions_on_user_id_and_action_type (user_id,action_type) # diff --git a/app/models/user_history.rb b/app/models/user_history.rb index bc4033c2c6d..ab0c5bbaff0 100644 --- a/app/models/user_history.rb +++ b/app/models/user_history.rb @@ -104,8 +104,8 @@ end # acting_user_id :integer # target_user_id :integer # details :text -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # context :string(255) # ip_address :string(255) # email :string(255) @@ -117,8 +117,8 @@ end # # 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_action_and_id (action,id) +# index_user_histories_on_subject_and_id (subject,id) +# index_user_histories_on_target_user_id_and_id (target_user_id,id) # diff --git a/app/models/user_open_id.rb b/app/models/user_open_id.rb index 183f2414823..b460bc6f99e 100644 --- a/app/models/user_open_id.rb +++ b/app/models/user_open_id.rb @@ -13,8 +13,8 @@ end # user_id :integer not null # email :string(255) not null # url :string(255) not null -# created_at :datetime not null -# updated_at :datetime not null +# created_at :datetime +# updated_at :datetime # active :boolean not null # # Indexes