From 9d6551529036b563f2fde2300b4b9258dee8cf9f Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Fri, 2 Mar 2018 13:15:18 -0600 Subject: [PATCH] Add index of ref class+id #130 --- .../2018_02_28_231807_create_journal_transactions_table.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Database/migrations/2018_02_28_231807_create_journal_transactions_table.php b/app/Database/migrations/2018_02_28_231807_create_journal_transactions_table.php index c6d3f14e..ab4d10fb 100644 --- a/app/Database/migrations/2018_02_28_231807_create_journal_transactions_table.php +++ b/app/Database/migrations/2018_02_28_231807_create_journal_transactions_table.php @@ -22,13 +22,14 @@ class CreateJournalTransactionsTable extends Migration $table->char('currency', 5); $table->text('memo')->nullable(); $table->char('ref_class', 32)->nullable(); - $table->integer('ref_class_id')->nullable(); + $table->text('ref_class_id')->nullable(); $table->timestamps(); $table->dateTime('post_date'); $table->softDeletes(); - $table->index('transaction_group'); $table->index('journal_id'); + $table->index('transaction_group'); + $table->index(['ref_class', 'ref_class_id']); }); }