From e0160fa90f79b97f4670afad0d99a2ce41b90674 Mon Sep 17 00:00:00 2001 From: benji Date: Mon, 16 Jan 2017 23:23:49 +0100 Subject: [PATCH] this is going well --- db/migrate/20170109123717_create_requests.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/migrate/20170109123717_create_requests.rb b/db/migrate/20170109123717_create_requests.rb index 34c1607..aff94ea 100644 --- a/db/migrate/20170109123717_create_requests.rb +++ b/db/migrate/20170109123717_create_requests.rb @@ -14,9 +14,9 @@ class CreateRequests < ActiveRecord::Migration end end - add_index :requests, :debtor_id unless index_exists?(:requests, :debtor) - add_index :requests, :creditor_id unless index_exists?(:requests, :creditor) - add_index :requests, [:issuer_type, :issuer_id] unless index_exists?(:requests, :issuer) + add_index :requests, :debtor_id unless index_exists?(:requests, :debtor_id) + add_index :requests, :creditor_id unless index_exists?(:requests, :creditor_id) + add_index :requests, [:issuer_type, :issuer_id] unless index_exists?(:requests, [:issuer_type, :issuer_id]) add_foreign_key :requests, :users, column: :creditor_id add_foreign_key :requests, :users, column: :debtor_id