Skip to content

Commit

Permalink
Merge pull request #489 from CloCkWeRX/add_index_account_contact
Browse files Browse the repository at this point in the history
Add index for contacts <-> accounts
  • Loading branch information
steveyken committed Aug 30, 2016
2 parents 211a273 + bfbf859 commit 794fa8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions db/migrate/20160511053730_add_account_contacts_index.rb
@@ -0,0 +1,5 @@
class AddAccountContactsIndex < ActiveRecord::Migration
def change
add_index :account_contacts, [:account_id, :contact_id]
end
end
4 changes: 3 additions & 1 deletion db/schema.rb
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20150227123054) do
ActiveRecord::Schema.define(version: 20160511053730) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand All @@ -24,6 +24,8 @@
t.datetime "updated_at"
end

add_index "account_contacts", ["account_id", "contact_id"], name: "index_account_contacts_on_account_id_and_contact_id", using: :btree

create_table "account_opportunities", force: :cascade do |t|
t.integer "account_id"
t.integer "opportunity_id"
Expand Down

0 comments on commit 794fa8b

Please sign in to comment.