From a52d6a537daa1e21a15338bd3faf015f1daf67de Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 1 May 2017 13:08:39 +0300 Subject: [PATCH] Fix for tests --- app/Jobs/PurgeAccountData.php | 2 +- .../2017_04_30_174702_add_multiple_database_support.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Jobs/PurgeAccountData.php b/app/Jobs/PurgeAccountData.php index c06425ea8db4..a244ed5e1364 100644 --- a/app/Jobs/PurgeAccountData.php +++ b/app/Jobs/PurgeAccountData.php @@ -63,7 +63,7 @@ class PurgeAccountData extends Job $current = config('database.default'); config(['database.default' => DB_NINJA_LOOKUP]); - $lookupAccount = LookupAccount::whereAccountKey($account->account_key)->first(); + $lookupAccount = LookupAccount::whereAccountKey($account->account_key)->firstOrFail(); DB::table('lookup_contacts')->where('lookup_account_id', '=', $lookupAccount->id)->delete(); DB::table('lookup_invitations')->where('lookup_account_id', '=', $lookupAccount->id)->delete(); diff --git a/database/migrations/2017_04_30_174702_add_multiple_database_support.php b/database/migrations/2017_04_30_174702_add_multiple_database_support.php index 3043cbf60a1e..eaf683fe687a 100644 --- a/database/migrations/2017_04_30_174702_add_multiple_database_support.php +++ b/database/migrations/2017_04_30_174702_add_multiple_database_support.php @@ -51,6 +51,7 @@ class AddMultipleDatabaseSupport extends Migration DB::table('db_servers')->insert( ['name' => 'db-server-1'] ); + } /** * Reverse the migrations.