From 9a7df140b7b9fcd22d68bdad601925796a983564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 13 Aug 2013 22:09:27 +0200 Subject: [PATCH] updated model annotations --- app/models/blocked_email.rb | 19 +++++++++++++++++++ app/models/category_featured_topic.rb | 1 + app/models/incoming_link.rb | 4 +++- app/models/optimized_image.rb | 3 ++- app/models/staff_action_log.rb | 9 +++++++++ app/models/topic_user.rb | 1 + 6 files changed, 35 insertions(+), 2 deletions(-) diff --git a/app/models/blocked_email.rb b/app/models/blocked_email.rb index b9a3b0ac475..1aa85ec4345 100644 --- a/app/models/blocked_email.rb +++ b/app/models/blocked_email.rb @@ -33,3 +33,22 @@ class BlockedEmail < ActiveRecord::Base end end + +# == Schema Information +# +# Table name: blocked_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 +# +# Indexes +# +# index_blocked_emails_on_email (email) UNIQUE +# index_blocked_emails_on_last_match_at (last_match_at) +# + diff --git a/app/models/category_featured_topic.rb b/app/models/category_featured_topic.rb index 728fbd96720..5bbdc3acae7 100644 --- a/app/models/category_featured_topic.rb +++ b/app/models/category_featured_topic.rb @@ -44,6 +44,7 @@ end # created_at :datetime not null # updated_at :datetime not null # rank :integer default(0), not null +# id :integer not null, primary key # # Indexes # diff --git a/app/models/incoming_link.rb b/app/models/incoming_link.rb index 42b6f6a650a..0ca8d4acc87 100644 --- a/app/models/incoming_link.rb +++ b/app/models/incoming_link.rb @@ -106,6 +106,8 @@ end # # Indexes # -# incoming_index (topic_id,post_number) +# incoming_index (topic_id,post_number) +# index_incoming_links_on_created_at_and_domain (created_at,domain) +# index_incoming_links_on_created_at_and_user_id (created_at,user_id) # diff --git a/app/models/optimized_image.rb b/app/models/optimized_image.rb index aee807d1e88..681059c8c2c 100644 --- a/app/models/optimized_image.rb +++ b/app/models/optimized_image.rb @@ -43,7 +43,7 @@ class OptimizedImage < ActiveRecord::Base def destroy OptimizedImage.transaction do - Discourse.store.remove_file(url) + Discourse.store.remove_optimized_image(self) super end end @@ -60,6 +60,7 @@ end # width :integer not null # height :integer not null # upload_id :integer not null +# url :string(255) not null # # Indexes # diff --git a/app/models/staff_action_log.rb b/app/models/staff_action_log.rb index 5d9e2628b85..b3312a1bda5 100644 --- a/app/models/staff_action_log.rb +++ b/app/models/staff_action_log.rb @@ -37,5 +37,14 @@ end # details :text # created_at :datetime not null # updated_at :datetime not null +# context :string(255) +# ip_address :string(255) +# email :string(255) +# +# 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_target_user_id_and_id (target_user_id,id) # diff --git a/app/models/topic_user.rb b/app/models/topic_user.rb index 185bede5350..f5e2efda96e 100644 --- a/app/models/topic_user.rb +++ b/app/models/topic_user.rb @@ -259,6 +259,7 @@ end # total_msecs_viewed :integer default(0), not null # cleared_pinned_at :datetime # unstarred_at :datetime +# id :integer not null, primary key # # Indexes #