From 4c62e391b7dd73d58bf19cbf9040c0704441cf3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Tue, 9 Jun 2020 00:40:08 +0300 Subject: [PATCH] added more indexes --- app/Listeners/Update/V20/Version2014.php | 29 ++++++++++++ app/Providers/Event.php | 1 + .../2020_06_09_000000_core_v2014.php | 44 +++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 app/Listeners/Update/V20/Version2014.php create mode 100644 database/migrations/2020_06_09_000000_core_v2014.php diff --git a/app/Listeners/Update/V20/Version2014.php b/app/Listeners/Update/V20/Version2014.php new file mode 100644 index 000000000..112a924cf --- /dev/null +++ b/app/Listeners/Update/V20/Version2014.php @@ -0,0 +1,29 @@ +skipThisUpdate($event)) { + return; + } + + Artisan::call('migrate', ['--force' => true]); + } +} diff --git a/app/Providers/Event.php b/app/Providers/Event.php index 1dc201f19..732e83143 100644 --- a/app/Providers/Event.php +++ b/app/Providers/Event.php @@ -20,6 +20,7 @@ class Event extends Provider 'App\Listeners\Update\V20\Version207', 'App\Listeners\Update\V20\Version208', 'App\Listeners\Update\V20\Version209', + 'App\Listeners\Update\V20\Version2014', ], 'Illuminate\Auth\Events\Login' => [ 'App\Listeners\Auth\Login', diff --git a/database/migrations/2020_06_09_000000_core_v2014.php b/database/migrations/2020_06_09_000000_core_v2014.php new file mode 100644 index 000000000..6d144b955 --- /dev/null +++ b/database/migrations/2020_06_09_000000_core_v2014.php @@ -0,0 +1,44 @@ +index($doc_type . '_id'); + }); + } + } + + Schema::table('transactions', function (Blueprint $table) { + $table->index('account_id'); + $table->index('category_id'); + $table->index('contact_id'); + $table->index('document_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}