Skip to content

Commit

Permalink
Always publish migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoungportable committed Oct 18, 2024
1 parent 80556f7 commit b17c7c5
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/Providers/FilaCmsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b17c7c5

Please sign in to comment.