diff --git a/config/monitoring.php b/config/monitoring.php index 35177f7..d5ab0cc 100644 --- a/config/monitoring.php +++ b/config/monitoring.php @@ -64,5 +64,10 @@ * Fill it if you want the Slack channel */ 'slack_webhook_url' => env('MONITORING_SLACK_WEBHOOK_URL') - ] + ], + + /* + * You can enable or disable migrations here + */ + 'migrations' => true ]; diff --git a/src/MonitoringServiceProvider.php b/src/MonitoringServiceProvider.php index cb8b2c8..b580361 100644 --- a/src/MonitoringServiceProvider.php +++ b/src/MonitoringServiceProvider.php @@ -50,6 +50,11 @@ public function register() */ public function boot() { + // load migrations + if (config('monitoring.migrations', true) && $this->app->runningInConsole()) { + $this->loadMigrationsFrom(__DIR__ . '/../database/migrations/'); + } + // register command $this->commands(RecordCommand::class);