From 3fb7798025d0a1c567cf30b1d59579c10984c051 Mon Sep 17 00:00:00 2001 From: Kath Young Date: Fri, 18 Oct 2024 08:40:28 +1030 Subject: [PATCH] Fix migration names --- src/Providers/FilaCmsServiceProvider.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Providers/FilaCmsServiceProvider.php b/src/Providers/FilaCmsServiceProvider.php index 7c08e618..8fbb4422 100644 --- a/src/Providers/FilaCmsServiceProvider.php +++ b/src/Providers/FilaCmsServiceProvider.php @@ -518,6 +518,9 @@ protected function getMigrationFileName(string $migrationFileName): string { $timestamp = date('Y_m_d_His'); + // Remove the auto_ prefix from the migration file name + $migrationFileName = preg_replace("/auto\_[0-9]+\_/", "", $migrationFileName); + $filesystem = $this->app->make(Filesystem::class); return Collection::make([$this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR])