Commit 07c7f358
Changed files (4)
db/migrate/20130616161746_add_more_missing_indexes.rb
@@ -0,0 +1,6 @@
+class AddMoreMissingIndexes < ActiveRecord::Migration
+ def change
+ add_index :taggings, :taggable_type
+ add_index :taggings, :tagger_type
+ end
+end
db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130505042432) do
+ActiveRecord::Schema.define(:version => 20130616161746) do
create_table "active_admin_comments", :force => true do |t|
t.integer "resource_id", :null => false
@@ -29,18 +29,18 @@ ActiveRecord::Schema.define(:version => 20130505042432) do
add_index "active_admin_comments", ["resource_type", "resource_id"], :name => "index_admin_notes_on_resource_type_and_resource_id"
create_table "admin_users", :force => true do |t|
- t.string "email", :default => "", :null => false
- t.string "encrypted_password", :default => "", :null => false
+ t.string "email", :default => "", :null => false
+ t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
- t.integer "sign_in_count", :default => 0
+ t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
add_index "admin_users", ["email"], :name => "index_admin_users_on_email", :unique => true
@@ -57,8 +57,8 @@ ActiveRecord::Schema.define(:version => 20130505042432) do
create_table "categories", :force => true do |t|
t.string "name"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.string "slug"
end
@@ -84,8 +84,8 @@ ActiveRecord::Schema.define(:version => 20130505042432) do
create_table "creations", :force => true do |t|
t.string "name"
t.text "story"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.integer "user_id"
t.string "image"
t.boolean "is_restricted", :default => false, :null => false
@@ -123,8 +123,8 @@ ActiveRecord::Schema.define(:version => 20130505042432) do
create_table "favorites", :force => true do |t|
t.integer "user_id"
t.integer "creation_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
add_index "favorites", ["creation_id"], :name => "index_favorites_on_creation_id"
@@ -139,8 +139,8 @@ ActiveRecord::Schema.define(:version => 20130505042432) do
create_table "photos", :force => true do |t|
t.integer "creation_id"
t.string "image"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.string "image_tmp"
end
@@ -158,7 +158,9 @@ ActiveRecord::Schema.define(:version => 20130505042432) do
add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
+ add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type"
add_index "taggings", ["tagger_id"], :name => "index_taggings_on_tagger_id"
+ add_index "taggings", ["tagger_type"], :name => "index_taggings_on_tagger_type"
create_table "tags", :force => true do |t|
t.string "name"
@@ -179,18 +181,18 @@ ActiveRecord::Schema.define(:version => 20130505042432) do
add_index "tutorials", ["user_id"], :name => "index_tutorials_on_user_id"
create_table "users", :force => true do |t|
- t.string "email", :default => "", :null => false
- t.string "encrypted_password", :default => "", :null => false
+ t.string "email", :default => "", :null => false
+ t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
- t.integer "sign_in_count", :default => 0
+ t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.string "name"
t.string "website"
t.string "twitter"
Gemfile
@@ -31,6 +31,7 @@ group :development, :test do
gem 'better_errors'
gem 'bullet'
gem 'rack-mini-profiler'
+ gem 'lol_dba'
end
group :test do
gem 'sqlite3'
Gemfile.lock
@@ -174,6 +174,10 @@ GEM
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
+ lol_dba (1.5.0)
+ actionpack (>= 3.0)
+ activerecord (>= 3.0)
+ railties (>= 3.0)
mail (2.5.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
@@ -319,6 +323,7 @@ DEPENDENCIES
jquery-fileupload-rails
jquery-rails
kaminari
+ lol_dba
newrelic_rpm
pg
rack-mini-profiler