Skip to content

Commit

Permalink
only perform migration when published
Browse files Browse the repository at this point in the history
  • Loading branch information
justijndepover committed Nov 21, 2020
1 parent 5a89ad3 commit 2796f48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/SettingsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ public function boot()
__DIR__ . '/../config/settings.php' => config_path('settings.php'),
], 'laravel-settings-config');

$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
if (! class_exists('CreateSettingsTable')) {
$this->publishes([
__DIR__ . '/../database/migrations/create_settings_table.php' => database_path('migrations/' . date('Y_m_d_His', time()) . '_create_settings_table.php'),
], 'laravel-settings-migration');
}
}

if (config('settings.driver') == 'database') {
Expand Down

0 comments on commit 2796f48

Please sign in to comment.