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.