From b17c7c53aa5e0ea7ce0f86fd0c56d296d31525a2 Mon Sep 17 00:00:00 2001 From: Kath Young Date: Fri, 18 Oct 2024 13:36:07 +1030 Subject: [PATCH] Always publish migrations --- src/Providers/FilaCmsServiceProvider.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Providers/FilaCmsServiceProvider.php b/src/Providers/FilaCmsServiceProvider.php index ad157201..2c1ac569 100644 --- a/src/Providers/FilaCmsServiceProvider.php +++ b/src/Providers/FilaCmsServiceProvider.php @@ -223,16 +223,13 @@ public function register() __DIR__ . '/../../config/fila-cms.php' => config_path('fila-cms.php'), ], 'fila-cms-config'); - // Only publish migrations if we're running inthe cli - if ($this->app->runningInConsole() || $this->app->runningUnitTests()) { - // Get all the migration stubs and publish them - $filePath = __DIR__.'/../../stubs/database/migrations/auto*.stub'; - $files = glob($filePath); - foreach ($files as $file) { - $this->publishes([ - $file => $this->getMigrationFileName(basename($file, '.stub') . '.php'), - ], 'fila-cms-migrations'); - } + // Get all the migration stubs and publish them + $filePath = __DIR__.'/../../stubs/database/migrations/auto*.stub'; + $files = glob($filePath); + foreach ($files as $file) { + $this->publishes([ + $file => $this->getMigrationFileName(basename($file, '.stub') . '.php'), + ], 'fila-cms-migrations'); } // use the vendor configuration file as fallback