From 641a9594e33129834b85c95dd779f01eddba991b Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Sun, 12 Jul 2015 10:09:47 -0300 Subject: [PATCH] performance: index user_id on profiles --- db/migrate/20150712130827_index_user_id_on_profiles.rb | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) create mode 100644 db/migrate/20150712130827_index_user_id_on_profiles.rb diff --git a/db/migrate/20150712130827_index_user_id_on_profiles.rb b/db/migrate/20150712130827_index_user_id_on_profiles.rb new file mode 100644 index 0000000..a885f49 --- /dev/null +++ b/db/migrate/20150712130827_index_user_id_on_profiles.rb @@ -0,0 +1,8 @@ +class IndexUserIdOnProfiles < ActiveRecord::Migration + + def change + add_index :profiles, :user_id + add_index :profiles, [:user_id, :type] + end + +end -- libgit2 0.21.2