From 382925259e6fc8f40f00d1189b1ba06b34f24ba0 Mon Sep 17 00:00:00 2001 From: holmesadam Date: Mon, 15 Jul 2024 10:39:57 +0100 Subject: [PATCH] Change order of migrate and seed Doing the migration second, meant that the seeds were getting deleted. Corrected the order. --- src/Traits/RefreshDatabaseFast.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Traits/RefreshDatabaseFast.php b/src/Traits/RefreshDatabaseFast.php index e21bf43..97f895f 100644 --- a/src/Traits/RefreshDatabaseFast.php +++ b/src/Traits/RefreshDatabaseFast.php @@ -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(); }