about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170418160728_add_indexes_to_reports_for_accounts.rb6
-rw-r--r--db/schema.rb4
2 files changed, 9 insertions, 1 deletions
diff --git a/db/migrate/20170418160728_add_indexes_to_reports_for_accounts.rb b/db/migrate/20170418160728_add_indexes_to_reports_for_accounts.rb
new file mode 100644
index 000000000..cd69bb8b1
--- /dev/null
+++ b/db/migrate/20170418160728_add_indexes_to_reports_for_accounts.rb
@@ -0,0 +1,6 @@
+class AddIndexesToReportsForAccounts < ActiveRecord::Migration[5.0]
+  def change
+    add_index :reports, :account_id
+    add_index :reports, :target_account_id
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 62ff4207d..78b419b82 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 20170414132105) do
+ActiveRecord::Schema.define(version: 20170418160728) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -215,6 +215,8 @@ ActiveRecord::Schema.define(version: 20170414132105) do
     t.datetime "created_at",                                 null: false
     t.datetime "updated_at",                                 null: false
     t.integer  "action_taken_by_account_id"
+    t.index ["account_id"], name: "index_reports_on_account_id", using: :btree
+    t.index ["target_account_id"], name: "index_reports_on_target_account_id", using: :btree
   end
 
   create_table "settings", force: :cascade do |t|