Added check for db migration when loading IntegrationServiceProvider

This commit is contained in:
Henry Whitaker
2020-08-15 15:44:13 +01:00
parent dc2ee05344
commit 640a62eed7

View File

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Ramsey\Uuid\Exception\InvalidUuidStringException; use Ramsey\Uuid\Exception\InvalidUuidStringException;
use Schema;
/** /**
* This class updates the integrations.php config with the relevant values * This class updates the integrations.php config with the relevant values
@@ -33,6 +34,7 @@ class IntegrationsServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
if(Schema::hasTable('settings')) {
$settings = [ $settings = [
'healthchecks_enabled' => (bool)SettingsHelper::get('healthchecks_enabled')->value, 'healthchecks_enabled' => (bool)SettingsHelper::get('healthchecks_enabled')->value,
'healthchecks_uuid' => SettingsHelper::get('healthchecks_uuid')->value, 'healthchecks_uuid' => SettingsHelper::get('healthchecks_uuid')->value,
@@ -64,3 +66,4 @@ class IntegrationsServiceProvider extends ServiceProvider
} }
} }
} }
}