diff --git a/app/models/upload.rb b/app/models/upload.rb
index 2d7d8042a..840235122 100644
--- a/app/models/upload.rb
+++ b/app/models/upload.rb
@@ -74,7 +74,7 @@ class Upload < ActiveRecord::Base
end
end
rescue Exception => x
- update_attribute(:status, "error: #{x.class} - #{x.message}")
+ update_attribute(:status, "error: #{x.class} - #{x.message}", :backtrace => x.backtrace.join("\n"))
ensure
delete_temp_file
end
diff --git a/app/views/news/_listing.html.erb b/app/views/news/_listing.html.erb
index b82fbbaf3..0ee6f9256 100644
--- a/app/views/news/_listing.html.erb
+++ b/app/views/news/_listing.html.erb
@@ -1,6 +1,6 @@
close
diff --git a/db/migrate/20100204214746_create_posts.rb b/db/migrate/20100204214746_create_posts.rb
index 6848d6138..8d37ee7a7 100644
--- a/db/migrate/20100204214746_create_posts.rb
+++ b/db/migrate/20100204214746_create_posts.rb
@@ -63,6 +63,8 @@ class CreatePosts < ActiveRecord::Migration
add_index :posts, :image_height
add_index :posts, :source
add_index :posts, :parent_id
+ add_index :posts, :uploader_id
+ add_index :posts, :uploader_ip_addr
execute "CREATE INDEX index_posts_on_mpixels ON posts (((image_width * image_height)::numeric / 1000000.0))"
diff --git a/db/migrate/20100205224030_create_uploads.rb b/db/migrate/20100205224030_create_uploads.rb
index f888ba1a5..a0462ad6e 100644
--- a/db/migrate/20100205224030_create_uploads.rb
+++ b/db/migrate/20100205224030_create_uploads.rb
@@ -9,10 +9,14 @@ class CreateUploads < ActiveRecord::Migration
t.column :uploader_ip_addr, "inet", :null => false
t.column :tag_string, :text, :null => false
t.column :status, :string, :null => false, :default => "pending"
+ t.column :backtrace, :text
t.column :post_id, :integer
t.column :md5_confirmation, :string
t.timestamps
end
+
+ add_index :uploads, :uploader_id
+ add_index :uploads, :uploader_ip_addr
end
def self.down