annotate models

This commit is contained in:
Sam 2013-08-28 10:42:58 +10:00
parent 8f94760cd4
commit dfa5a8a83f
8 changed files with 86 additions and 5 deletions

View File

@ -2,3 +2,22 @@ class Oauth2UserInfo < ActiveRecord::Base
belongs_to :user
end
# == Schema Information
#
# Table name: oauth2_user_infos
#
# id :integer not null, primary key
# user_id :integer not null
# uid :string(255) not null
# provider :string(255) not null
# email :string(255)
# name :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_oauth2_user_infos_on_uid_and_provider (uid,provider) UNIQUE
#

View File

@ -1,2 +1,18 @@
class PluginStoreRow < ActiveRecord::Base
end
# == Schema Information
#
# Table name: plugin_store_rows
#
# id :integer not null, primary key
# plugin_name :string(255) not null
# key :string(255) not null
# type_name :string(255) not null
# value :text
#
# Indexes
#
# index_plugin_store_rows_on_plugin_name_and_key (plugin_name,key) UNIQUE
#

View File

@ -23,3 +23,23 @@ class ScreenedEmail < ActiveRecord::Base
end
end
# == Schema Information
#
# Table name: screened_emails
#
# id :integer not null, primary key
# email :string(255) not null
# 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
# ip_address :string
#
# Indexes
#
# index_blocked_emails_on_email (email) UNIQUE
# index_blocked_emails_on_last_match_at (last_match_at)
#

View File

@ -24,3 +24,24 @@ class ScreenedUrl < ActiveRecord::Base
find_by_url(url) || create(opts.slice(:action_type, :ip_address).merge(url: url, domain: domain))
end
end
# == Schema Information
#
# Table name: screened_urls
#
# id :integer not null, primary key
# url :string(255) not null
# domain :string(255) not null
# 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
# ip_address :string
#
# Indexes
#
# index_screened_urls_on_last_match_at (last_match_at)
# index_screened_urls_on_url (url) UNIQUE
#

View File

@ -53,11 +53,15 @@ end
# context :string(255)
# ip_address :string(255)
# email :string(255)
# subject :text
# previous_value :text
# new_value :text
#
# Indexes
#
# index_staff_action_logs_on_action_and_id (action,id)
# index_staff_action_logs_on_staff_user_id_and_id (staff_user_id,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)
#

View File

@ -204,7 +204,7 @@ 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_forum_thread_links_on_forum_thread_id (topic_id)
# unique_post_links (topic_id,post_id,url) UNIQUE
#

View File

@ -53,6 +53,6 @@ end
#
# Indexes
#
# index_forum_thread_link_clicks_on_forum_thread_link_id (topic_link_id)
# by_link (topic_link_id)
#

View File

@ -647,7 +647,7 @@ end
# website :string(255)
# admin :boolean default(FALSE), not null
# last_emailed_at :datetime
# email_digests :boolean default(TRUE), not null
# email_digests :boolean not null
# trust_level :integer not null
# bio_cooked :text
# email_private_messages :boolean default(TRUE)
@ -657,7 +657,7 @@ end
# approved_at :datetime
# topics_entered :integer default(0), not null
# posts_read_count :integer default(0), not null
# digest_after_days :integer default(7), not null
# digest_after_days :integer
# previous_visit_at :datetime
# banned_at :datetime
# banned_till :datetime
@ -690,3 +690,4 @@ end
# index_users_on_username (username) UNIQUE
# index_users_on_username_lower (username_lower) UNIQUE
#