parent
98e8523eec
commit
6bed4e1bf0
|
@ -31,6 +31,7 @@ end
|
||||||
# created_by_id :integer
|
# created_by_id :integer
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
|
# allowed_ips :inet is an Array
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -303,6 +303,7 @@ end
|
||||||
# trigger :integer
|
# trigger :integer
|
||||||
# show_posts :boolean default(FALSE), not null
|
# show_posts :boolean default(FALSE), not null
|
||||||
# system :boolean default(FALSE), not null
|
# system :boolean default(FALSE), not null
|
||||||
|
# image :string(255)
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -393,38 +393,39 @@ end
|
||||||
#
|
#
|
||||||
# Table name: categories
|
# Table name: categories
|
||||||
#
|
#
|
||||||
# id :integer not null, primary key
|
# id :integer not null, primary key
|
||||||
# name :string(50) not null
|
# name :string(50) not null
|
||||||
# color :string(6) default("AB9364"), not null
|
# color :string(6) default("AB9364"), not null
|
||||||
# topic_id :integer
|
# topic_id :integer
|
||||||
# topic_count :integer default(0), not null
|
# topic_count :integer default(0), not null
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# user_id :integer not null
|
# user_id :integer not null
|
||||||
# topics_year :integer default(0)
|
# topics_year :integer default(0)
|
||||||
# topics_month :integer default(0)
|
# topics_month :integer default(0)
|
||||||
# topics_week :integer default(0)
|
# topics_week :integer default(0)
|
||||||
# slug :string(255) not null
|
# slug :string(255) not null
|
||||||
# description :text
|
# description :text
|
||||||
# text_color :string(6) default("FFFFFF"), not null
|
# text_color :string(6) default("FFFFFF"), not null
|
||||||
# read_restricted :boolean default(FALSE), not null
|
# read_restricted :boolean default(FALSE), not null
|
||||||
# auto_close_hours :float
|
# auto_close_hours :float
|
||||||
# post_count :integer default(0), not null
|
# post_count :integer default(0), not null
|
||||||
# latest_post_id :integer
|
# latest_post_id :integer
|
||||||
# latest_topic_id :integer
|
# latest_topic_id :integer
|
||||||
# position :integer
|
# position :integer
|
||||||
# parent_category_id :integer
|
# parent_category_id :integer
|
||||||
# posts_year :integer default(0)
|
# posts_year :integer default(0)
|
||||||
# posts_month :integer default(0)
|
# posts_month :integer default(0)
|
||||||
# posts_week :integer default(0)
|
# posts_week :integer default(0)
|
||||||
# email_in :string(255)
|
# email_in :string(255)
|
||||||
# email_in_allow_strangers :boolean default(FALSE)
|
# email_in_allow_strangers :boolean default(FALSE)
|
||||||
# topics_day :integer default(0)
|
# topics_day :integer default(0)
|
||||||
# posts_day :integer default(0)
|
# posts_day :integer default(0)
|
||||||
# logo_url :string(255)
|
# logo_url :string(255)
|
||||||
# background_url :string(255)
|
# background_url :string(255)
|
||||||
# allow_badges :boolean default(TRUE), not null
|
# allow_badges :boolean default(TRUE), not null
|
||||||
# name_lower :string(50) not null
|
# name_lower :string(50) not null
|
||||||
|
# auto_close_based_on_last_post :boolean default(FALSE)
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -580,13 +580,14 @@ end
|
||||||
# version :integer default(1), not null
|
# version :integer default(1), not null
|
||||||
# cook_method :integer default(1), not null
|
# cook_method :integer default(1), not null
|
||||||
# wiki :boolean default(FALSE), not null
|
# wiki :boolean default(FALSE), not null
|
||||||
# via_email :boolean default(FALSE), not null
|
|
||||||
# raw_email :text
|
|
||||||
# baked_at :datetime
|
# baked_at :datetime
|
||||||
# baked_version :integer
|
# baked_version :integer
|
||||||
# hidden_at :datetime
|
# hidden_at :datetime
|
||||||
# self_edits :integer default(0), not null
|
# self_edits :integer default(0), not null
|
||||||
# reply_quoted :boolean default(FALSE), 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
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -464,5 +464,6 @@ end
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
# idx_unique_actions (user_id,post_action_type_id,post_id,targets_topic) UNIQUE
|
# 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_post_id (post_id)
|
||||||
#
|
#
|
||||||
|
|
|
@ -47,6 +47,7 @@ end
|
||||||
# number :integer
|
# number :integer
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
|
# hidden :boolean default(FALSE), not null
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -215,6 +215,8 @@ end
|
||||||
# mobile_stylesheet :text
|
# mobile_stylesheet :text
|
||||||
# mobile_header :text
|
# mobile_header :text
|
||||||
# mobile_stylesheet_baked :text
|
# mobile_stylesheet_baked :text
|
||||||
|
# footer :text
|
||||||
|
# mobile_footer :text
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -33,14 +33,14 @@ end
|
||||||
|
|
||||||
# == Schema Information
|
# == Schema Information
|
||||||
#
|
#
|
||||||
# Table name: site_text
|
# Table name: site_texts
|
||||||
#
|
#
|
||||||
# text_type :string(255) not null, primary key
|
# text_type :string(255) not null, primary key
|
||||||
# value :text not null
|
# value :text not null
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
# index_site_text_on_text_type (text_type) UNIQUE
|
# index_site_texts_on_text_type (text_type) UNIQUE
|
||||||
#
|
#
|
||||||
|
|
|
@ -855,56 +855,58 @@ end
|
||||||
#
|
#
|
||||||
# Table name: topics
|
# Table name: topics
|
||||||
#
|
#
|
||||||
# id :integer not null, primary key
|
# id :integer not null, primary key
|
||||||
# title :string(255) not null
|
# title :string(255) not null
|
||||||
# last_posted_at :datetime
|
# last_posted_at :datetime
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# views :integer default(0), not null
|
# views :integer default(0), not null
|
||||||
# posts_count :integer default(0), not null
|
# posts_count :integer default(0), not null
|
||||||
# user_id :integer
|
# user_id :integer
|
||||||
# last_post_user_id :integer not null
|
# last_post_user_id :integer not null
|
||||||
# reply_count :integer default(0), not null
|
# reply_count :integer default(0), not null
|
||||||
# featured_user1_id :integer
|
# featured_user1_id :integer
|
||||||
# featured_user2_id :integer
|
# featured_user2_id :integer
|
||||||
# featured_user3_id :integer
|
# featured_user3_id :integer
|
||||||
# avg_time :integer
|
# avg_time :integer
|
||||||
# deleted_at :datetime
|
# deleted_at :datetime
|
||||||
# highest_post_number :integer default(0), not null
|
# highest_post_number :integer default(0), not null
|
||||||
# image_url :string(255)
|
# image_url :string(255)
|
||||||
# off_topic_count :integer default(0), not null
|
# off_topic_count :integer default(0), not null
|
||||||
# like_count :integer default(0), not null
|
# like_count :integer default(0), not null
|
||||||
# incoming_link_count :integer default(0), not null
|
# incoming_link_count :integer default(0), not null
|
||||||
# bookmark_count :integer default(0), not null
|
# bookmark_count :integer default(0), not null
|
||||||
# star_count :integer default(0), not null
|
# star_count :integer default(0), not null
|
||||||
# category_id :integer
|
# category_id :integer
|
||||||
# visible :boolean default(TRUE), not null
|
# visible :boolean default(TRUE), not null
|
||||||
# moderator_posts_count :integer default(0), not null
|
# moderator_posts_count :integer default(0), not null
|
||||||
# closed :boolean default(FALSE), not null
|
# closed :boolean default(FALSE), not null
|
||||||
# archived :boolean default(FALSE), not null
|
# archived :boolean default(FALSE), not null
|
||||||
# bumped_at :datetime not null
|
# bumped_at :datetime not null
|
||||||
# has_summary :boolean default(FALSE), not null
|
# has_summary :boolean default(FALSE), not null
|
||||||
# vote_count :integer default(0), not null
|
# vote_count :integer default(0), not null
|
||||||
# archetype :string(255) default("regular"), not null
|
# archetype :string(255) default("regular"), not null
|
||||||
# featured_user4_id :integer
|
# featured_user4_id :integer
|
||||||
# notify_moderators_count :integer default(0), not null
|
# notify_moderators_count :integer default(0), not null
|
||||||
# spam_count :integer default(0), not null
|
# spam_count :integer default(0), not null
|
||||||
# illegal_count :integer default(0), not null
|
# illegal_count :integer default(0), not null
|
||||||
# inappropriate_count :integer default(0), not null
|
# inappropriate_count :integer default(0), not null
|
||||||
# pinned_at :datetime
|
# pinned_at :datetime
|
||||||
# score :float
|
# score :float
|
||||||
# percent_rank :float default(1.0), not null
|
# percent_rank :float default(1.0), not null
|
||||||
# notify_user_count :integer default(0), not null
|
# notify_user_count :integer default(0), not null
|
||||||
# subtype :string(255)
|
# subtype :string(255)
|
||||||
# slug :string(255)
|
# slug :string(255)
|
||||||
# auto_close_at :datetime
|
# auto_close_at :datetime
|
||||||
# auto_close_user_id :integer
|
# auto_close_user_id :integer
|
||||||
# auto_close_started_at :datetime
|
# auto_close_started_at :datetime
|
||||||
# deleted_by_id :integer
|
# deleted_by_id :integer
|
||||||
# participant_count :integer default(1)
|
# participant_count :integer default(1)
|
||||||
# word_count :integer
|
# word_count :integer
|
||||||
# excerpt :string(1000)
|
# excerpt :string(1000)
|
||||||
# pinned_globally :boolean default(FALSE), not null
|
# pinned_globally :boolean default(FALSE), not null
|
||||||
|
# auto_close_based_on_last_post :boolean default(FALSE)
|
||||||
|
# auto_close_hours :float
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -297,4 +297,5 @@ end
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
# index_topic_users_on_topic_id_and_user_id (topic_id,user_id) UNIQUE
|
# 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
|
||||||
#
|
#
|
||||||
|
|
|
@ -150,6 +150,7 @@ end
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# sha1 :string(40)
|
# sha1 :string(40)
|
||||||
# origin :string(1000)
|
# origin :string(1000)
|
||||||
|
# retain_hours :integer
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -875,12 +875,13 @@ end
|
||||||
# uploaded_avatar_id :integer
|
# uploaded_avatar_id :integer
|
||||||
# email_always :boolean default(FALSE), not null
|
# email_always :boolean default(FALSE), not null
|
||||||
# mailing_list_mode :boolean default(FALSE), not null
|
# mailing_list_mode :boolean default(FALSE), not null
|
||||||
# primary_group_id :integer
|
|
||||||
# locale :string(10)
|
# locale :string(10)
|
||||||
|
# primary_group_id :integer
|
||||||
# registration_ip_address :inet
|
# registration_ip_address :inet
|
||||||
# last_redirected_to_top_at :datetime
|
# last_redirected_to_top_at :datetime
|
||||||
# disable_jump_reply :boolean default(FALSE), not null
|
# disable_jump_reply :boolean default(FALSE), not null
|
||||||
# edit_history_public :boolean default(FALSE), not null
|
# edit_history_public :boolean default(FALSE), not null
|
||||||
|
# trust_level_locked :boolean default(FALSE), not null
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
class UserField < ActiveRecord::Base
|
class UserField < ActiveRecord::Base
|
||||||
validates_presence_of :name, :description, :field_type
|
validates_presence_of :name, :description, :field_type
|
||||||
end
|
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
|
||||||
|
#
|
||||||
|
|
|
@ -126,6 +126,7 @@ end
|
||||||
# new_value :text
|
# new_value :text
|
||||||
# topic_id :integer
|
# topic_id :integer
|
||||||
# admin_only :boolean default(FALSE)
|
# admin_only :boolean default(FALSE)
|
||||||
|
# post_id :integer
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -106,10 +106,12 @@ end
|
||||||
# website :string(255)
|
# website :string(255)
|
||||||
# bio_raw :text
|
# bio_raw :text
|
||||||
# bio_cooked :text
|
# bio_cooked :text
|
||||||
# dismissed_banner_key :integer
|
|
||||||
# profile_background :string(255)
|
# profile_background :string(255)
|
||||||
# card_background :string(255)
|
# dismissed_banner_key :integer
|
||||||
# bio_cooked_version :integer
|
# bio_cooked_version :integer
|
||||||
|
# badge_granted_title :boolean default(FALSE)
|
||||||
|
# card_background :string(255)
|
||||||
|
# card_image_badge_id :integer
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -3,3 +3,20 @@ class Warning < ActiveRecord::Base
|
||||||
belongs_to :topic
|
belongs_to :topic
|
||||||
belongs_to :created_by, class_name: 'User'
|
belongs_to :created_by, class_name: 'User'
|
||||||
end
|
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)
|
||||||
|
#
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue