From 30dbd1fda50b51f02876385ec9b99a2426ce6607 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 1 Jan 2018 23:10:40 +0200 Subject: [PATCH] Add activities index --- .../2017_11_15_114422_add_subdomain_to_lookups.php | 6 ++++++ .../migrations/2017_12_13_074024_add_remember_2fa_token.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/database/migrations/2017_11_15_114422_add_subdomain_to_lookups.php b/database/migrations/2017_11_15_114422_add_subdomain_to_lookups.php index 3398938e68d7..6c04591a6f43 100644 --- a/database/migrations/2017_11_15_114422_add_subdomain_to_lookups.php +++ b/database/migrations/2017_11_15_114422_add_subdomain_to_lookups.php @@ -95,6 +95,12 @@ class AddSubdomainToLookups extends Migration Schema::table('accounts', function ($table) { $table->boolean('inclusive_taxes')->default(0); }); + + if (Utils::isNinja()) { + Schema::table('activities', function ($table) { + $table->index('user_id'); + }); + } } /** diff --git a/database/migrations/2017_12_13_074024_add_remember_2fa_token.php b/database/migrations/2017_12_13_074024_add_remember_2fa_token.php index ff491a5c4a6c..cd0636bf1582 100644 --- a/database/migrations/2017_12_13_074024_add_remember_2fa_token.php +++ b/database/migrations/2017_12_13_074024_add_remember_2fa_token.php @@ -95,6 +95,12 @@ class AddRemember2faToken extends Migration where invoices.id = activities.invoice_id and invoices.is_recurring = 0 and invoices.invoice_type_id = 2"); + + if (! Utils::isNinja()) { + Schema::table('activities', function ($table) { + $table->index('user_id'); + }); + } } /**