Skip to content

Commit

Permalink
Change order of migrate and seed
Browse files Browse the repository at this point in the history
Doing the migration second, meant that the seeds were getting deleted. Corrected the order.
  • Loading branch information
holmesadam authored Jul 15, 2024
1 parent cf1e6bf commit 3829252
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/RefreshDatabaseFast.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ protected function refreshTestDatabase(): void
protected function runMigrationsIfNecessary(): void
{
if (! $this->identicalChecksum()) {
$this->artisan('migrate:fresh', $this->migrateFreshUsing());

if (config('useful-additions.refresh_db_fast.seed')) {
$this->seed();
}

$this->artisan('migrate:fresh', $this->migrateFreshUsing());

//create checksum after migration finishes
$this->createChecksum();
}
Expand Down

0 comments on commit 3829252

Please sign in to comment.