Skip to content

Commit

Permalink
fix: run package migration only when testing, not on the project data…
Browse files Browse the repository at this point in the history
…base
  • Loading branch information
WatheqAlshowaiter committed Jul 14, 2024
1 parent 100c8b4 commit 6338ecb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ModelRequiredFieldsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public function register()

public function boot()
{
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
// This migration works only in the package test
if ($this->app->runningInConsole() && $this->app->environment() === 'testing') {
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
}
}
}

0 comments on commit 6338ecb

Please sign in to comment.