diff --git a/app/Jobs/Util/VersionCheck.php b/app/Jobs/Util/VersionCheck.php index f74a19e49bb9..71195bd1caeb 100644 --- a/app/Jobs/Util/VersionCheck.php +++ b/app/Jobs/Util/VersionCheck.php @@ -39,7 +39,7 @@ class VersionCheck implements ShouldQueue nlog("latest version = {$version_file}"); - if ($version_file) { + if (Ninja::isSelfHost() && $version_file) { Account::whereNotNull('id')->update(['latest_version' => $version_file]); } diff --git a/database/migrations/2022_07_09_235510_add_index_to_payment_hash.php b/database/migrations/2022_07_09_235510_add_index_to_payment_hash.php index 37c475e383a4..e5495b50a8b3 100644 --- a/database/migrations/2022_07_09_235510_add_index_to_payment_hash.php +++ b/database/migrations/2022_07_09_235510_add_index_to_payment_hash.php @@ -16,6 +16,17 @@ class AddIndexToPaymentHash extends Migration Schema::table('payment_hashes', function (Blueprint $table) { $table->string('hash', 255)->index()->change(); }); + + Schema::table('activities', function (Blueprint $table) { + $table->index(['quote_id', 'company_id']); + $table->index(['recurring_invoice_id', 'company_id']); + $table->index(['purchase_order_id', 'company_id']); + $table->index(['vendor_contact_id', 'company_id']); + }); + + Schema::table('products', function (Blueprint $table) { + $table->index(['company_id', 'user_id', 'assigned_user_id', 'updated_at'],'pro_co_us_up_index'); + }); } /**