diff --git a/app/models/api_key.rb b/app/models/api_key.rb index dc6195baeb1..099506ebf65 100644 --- a/app/models/api_key.rb +++ b/app/models/api_key.rb @@ -31,6 +31,7 @@ end # created_by_id :integer # created_at :datetime not null # updated_at :datetime not null +# allowed_ips :inet is an Array # # Indexes # diff --git a/app/models/badge.rb b/app/models/badge.rb index ea50d782d6f..e040d761be8 100644 --- a/app/models/badge.rb +++ b/app/models/badge.rb @@ -303,6 +303,7 @@ end # trigger :integer # show_posts :boolean default(FALSE), not null # system :boolean default(FALSE), not null +# image :string(255) # # Indexes # diff --git a/app/models/category.rb b/app/models/category.rb index 9af8a4ca7b4..846f5b36b15 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -393,38 +393,39 @@ 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 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) -# logo_url :string(255) -# background_url :string(255) -# allow_badges :boolean default(TRUE), not null -# name_lower :string(50) not null +# 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) +# logo_url :string(255) +# background_url :string(255) +# allow_badges :boolean default(TRUE), not null +# name_lower :string(50) not null +# auto_close_based_on_last_post :boolean default(FALSE) # # Indexes # diff --git a/app/models/post.rb b/app/models/post.rb index b4b64f9696b..81f03cd9116 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -580,13 +580,14 @@ end # version :integer default(1), not null # cook_method :integer default(1), not null # wiki :boolean default(FALSE), not null -# via_email :boolean default(FALSE), not null -# raw_email :text # baked_at :datetime # baked_version :integer # hidden_at :datetime # self_edits :integer default(0), not null # reply_quoted :boolean default(FALSE), not null +# via_email :boolean default(FALSE), not null +# raw_email :text +# public_version :integer default(1), not null # # Indexes # diff --git a/app/models/post_action.rb b/app/models/post_action.rb index e40c34c1885..b224f452767 100644 --- a/app/models/post_action.rb +++ b/app/models/post_action.rb @@ -464,5 +464,6 @@ 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) # diff --git a/app/models/post_revision.rb b/app/models/post_revision.rb index 1eb71926559..a11a1f35ed7 100644 --- a/app/models/post_revision.rb +++ b/app/models/post_revision.rb @@ -47,6 +47,7 @@ end # number :integer # created_at :datetime not null # updated_at :datetime not null +# hidden :boolean default(FALSE), not null # # Indexes # diff --git a/app/models/site_customization.rb b/app/models/site_customization.rb index 6b88d9dfdd1..b0ca6245911 100644 --- a/app/models/site_customization.rb +++ b/app/models/site_customization.rb @@ -215,6 +215,8 @@ end # mobile_stylesheet :text # mobile_header :text # mobile_stylesheet_baked :text +# footer :text +# mobile_footer :text # # Indexes # diff --git a/app/models/site_text.rb b/app/models/site_text.rb index f3f7559d5cd..3c481cfcad3 100644 --- a/app/models/site_text.rb +++ b/app/models/site_text.rb @@ -33,14 +33,14 @@ end # == Schema Information # -# Table name: site_text +# Table name: site_texts # -# text_type :string(255) not null, primary key -# value :text not null -# created_at :datetime not null -# updated_at :datetime not null +# text_type :string(255) not null, primary key +# value :text not null +# created_at :datetime not null +# updated_at :datetime not null # # Indexes # -# index_site_text_on_text_type (text_type) UNIQUE +# index_site_texts_on_text_type (text_type) UNIQUE # diff --git a/app/models/topic.rb b/app/models/topic.rb index 9eae898bb37..d37e93d5853 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -855,56 +855,58 @@ end # # Table name: topics # -# 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 -# views :integer default(0), not null -# posts_count :integer default(0), not null -# user_id :integer -# last_post_user_id :integer not null -# reply_count :integer default(0), not null -# featured_user1_id :integer -# featured_user2_id :integer -# featured_user3_id :integer -# avg_time :integer -# deleted_at :datetime -# highest_post_number :integer default(0), not null -# image_url :string(255) -# off_topic_count :integer default(0), not null -# like_count :integer default(0), not null -# incoming_link_count :integer default(0), not null -# bookmark_count :integer default(0), not null -# star_count :integer default(0), not null -# category_id :integer -# visible :boolean default(TRUE), not null -# moderator_posts_count :integer default(0), not null -# closed :boolean default(FALSE), not null -# archived :boolean default(FALSE), not null -# bumped_at :datetime not null -# has_summary :boolean default(FALSE), not null -# vote_count :integer default(0), not null -# archetype :string(255) default("regular"), not null -# featured_user4_id :integer -# notify_moderators_count :integer default(0), not null -# spam_count :integer default(0), not null -# illegal_count :integer default(0), not null -# inappropriate_count :integer default(0), not null -# pinned_at :datetime -# score :float -# percent_rank :float default(1.0), not null -# notify_user_count :integer default(0), not null -# subtype :string(255) -# slug :string(255) -# auto_close_at :datetime -# auto_close_user_id :integer -# auto_close_started_at :datetime -# deleted_by_id :integer -# participant_count :integer default(1) -# word_count :integer -# excerpt :string(1000) -# pinned_globally :boolean default(FALSE), not null +# 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 +# views :integer default(0), not null +# posts_count :integer default(0), not null +# user_id :integer +# last_post_user_id :integer not null +# reply_count :integer default(0), not null +# featured_user1_id :integer +# featured_user2_id :integer +# featured_user3_id :integer +# avg_time :integer +# deleted_at :datetime +# highest_post_number :integer default(0), not null +# image_url :string(255) +# off_topic_count :integer default(0), not null +# like_count :integer default(0), not null +# incoming_link_count :integer default(0), not null +# bookmark_count :integer default(0), not null +# star_count :integer default(0), not null +# category_id :integer +# visible :boolean default(TRUE), not null +# moderator_posts_count :integer default(0), not null +# closed :boolean default(FALSE), not null +# archived :boolean default(FALSE), not null +# bumped_at :datetime not null +# has_summary :boolean default(FALSE), not null +# vote_count :integer default(0), not null +# archetype :string(255) default("regular"), not null +# featured_user4_id :integer +# notify_moderators_count :integer default(0), not null +# spam_count :integer default(0), not null +# illegal_count :integer default(0), not null +# inappropriate_count :integer default(0), not null +# pinned_at :datetime +# score :float +# percent_rank :float default(1.0), not null +# notify_user_count :integer default(0), not null +# subtype :string(255) +# slug :string(255) +# auto_close_at :datetime +# auto_close_user_id :integer +# auto_close_started_at :datetime +# deleted_by_id :integer +# participant_count :integer default(1) +# word_count :integer +# excerpt :string(1000) +# pinned_globally :boolean default(FALSE), not null +# auto_close_based_on_last_post :boolean default(FALSE) +# auto_close_hours :float # # Indexes # diff --git a/app/models/topic_user.rb b/app/models/topic_user.rb index b252eca7307..a70bf224ad9 100644 --- a/app/models/topic_user.rb +++ b/app/models/topic_user.rb @@ -297,4 +297,5 @@ end # Indexes # # index_topic_users_on_topic_id_and_user_id (topic_id,user_id) UNIQUE +# index_topic_users_on_user_id_and_topic_id (user_id,topic_id) UNIQUE # diff --git a/app/models/upload.rb b/app/models/upload.rb index 9880acece14..33432a28a4b 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -150,6 +150,7 @@ end # updated_at :datetime not null # sha1 :string(40) # origin :string(1000) +# retain_hours :integer # # Indexes # diff --git a/app/models/user.rb b/app/models/user.rb index cafd7ddc3e8..56cad0d7052 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -875,12 +875,13 @@ 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) +# primary_group_id :integer # registration_ip_address :inet # last_redirected_to_top_at :datetime # disable_jump_reply :boolean default(FALSE), not null # edit_history_public :boolean default(FALSE), not null +# trust_level_locked :boolean default(FALSE), not null # # Indexes # diff --git a/app/models/user_field.rb b/app/models/user_field.rb index 55a85d2b229..b87fd35b0cc 100644 --- a/app/models/user_field.rb +++ b/app/models/user_field.rb @@ -1,3 +1,17 @@ class UserField < ActiveRecord::Base validates_presence_of :name, :description, :field_type end + +# == Schema Information +# +# Table name: user_fields +# +# id :integer not null, primary key +# name :string(255) not null +# field_type :string(255) not null +# created_at :datetime +# updated_at :datetime +# editable :boolean default(FALSE), not null +# description :string(255) not null +# required :boolean default(TRUE), not null +# diff --git a/app/models/user_history.rb b/app/models/user_history.rb index e10cdd97605..954a66ac067 100644 --- a/app/models/user_history.rb +++ b/app/models/user_history.rb @@ -126,6 +126,7 @@ end # new_value :text # topic_id :integer # admin_only :boolean default(FALSE) +# post_id :integer # # Indexes # diff --git a/app/models/user_profile.rb b/app/models/user_profile.rb index c89498d7f35..3059d2a289a 100644 --- a/app/models/user_profile.rb +++ b/app/models/user_profile.rb @@ -106,10 +106,12 @@ end # website :string(255) # bio_raw :text # bio_cooked :text -# dismissed_banner_key :integer # profile_background :string(255) -# card_background :string(255) +# dismissed_banner_key :integer # bio_cooked_version :integer +# badge_granted_title :boolean default(FALSE) +# card_background :string(255) +# card_image_badge_id :integer # # Indexes # diff --git a/app/models/warning.rb b/app/models/warning.rb index 7d60d2deb50..0d177fb0c66 100644 --- a/app/models/warning.rb +++ b/app/models/warning.rb @@ -3,3 +3,20 @@ class Warning < ActiveRecord::Base belongs_to :topic belongs_to :created_by, class_name: 'User' end + +# == Schema Information +# +# Table name: warnings +# +# id :integer not null, primary key +# topic_id :integer not null +# user_id :integer not null +# created_by_id :integer not null +# created_at :datetime +# updated_at :datetime +# +# Indexes +# +# index_warnings_on_topic_id (topic_id) UNIQUE +# index_warnings_on_user_id (user_id) +# diff --git a/db/migrate/20141120035016_add_allowed_ips_to_api_keys.rb b/db/migrate/20141120035016_add_allowed_ips_to_api_keys.rb new file mode 100644 index 00000000000..846c8891957 --- /dev/null +++ b/db/migrate/20141120035016_add_allowed_ips_to_api_keys.rb @@ -0,0 +1,7 @@ +class AddAllowedIpsToApiKeys < ActiveRecord::Migration + def change + change_table :api_keys do |t| + t.inet :allowed_ips, array: true + end + end +end