From 3f888f909ae33b68f98c6756158ce51d862d5a32 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Thu, 23 Apr 2020 19:47:00 +0800 Subject: [PATCH] fixed migrate create failed --- extend/catcher/command/MigrateCreateCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extend/catcher/command/MigrateCreateCommand.php b/extend/catcher/command/MigrateCreateCommand.php index be878a9..dc32ff4 100644 --- a/extend/catcher/command/MigrateCreateCommand.php +++ b/extend/catcher/command/MigrateCreateCommand.php @@ -62,7 +62,7 @@ class MigrateCreateCommand extends Create */ protected function create($module, $className): string { - $path = CatchAdmin::moduleMigrationsDirectory($module); + $path = CatchAdmin::makeDirectory(CatchAdmin::moduleMigrationsDirectory($module)); if (!Util::isValidPhinxClassName($className)) { throw new InvalidArgumentException(sprintf('The migration class name "%s" is invalid. Please use CamelCase format.', $className)); @@ -74,6 +74,7 @@ class MigrateCreateCommand extends Create // Compute the file path $fileName = Util::mapClassNameToFileName($className); + $filePath = $path . DIRECTORY_SEPARATOR . $fileName; if (is_file($filePath)) {