From 94fc10c26e40fd71c69335b9679d618e1d6f4da0 Mon Sep 17 00:00:00 2001 From: Barbosa Date: Sat, 30 Sep 2023 10:21:40 -0500 Subject: [PATCH 1/3] fix: enseure db dir exists --- core/Database/Console/MakeMigration.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/Database/Console/MakeMigration.php b/core/Database/Console/MakeMigration.php index 4f6fbf8..5d62afd 100644 --- a/core/Database/Console/MakeMigration.php +++ b/core/Database/Console/MakeMigration.php @@ -6,6 +6,7 @@ use Carbon\Carbon; use Core\Console\Maker; +use Core\Facades\File; use Core\Util\Str; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -42,6 +43,10 @@ protected function configure(): void protected function execute(InputInterface $input, OutputInterface $output): int { + if (! File::exists(base_path('database'))) { + File::createDirectory(base_path('database')); + } + $datetime = Carbon::now()->format('YmdHis'); $this->fileName = $datetime . '_' . Str::snake($input->getArgument('name')); From 546942b9bbfff73c4d16414972f06ad0fcdc9b84 Mon Sep 17 00:00:00 2001 From: Barbosa Date: Sat, 30 Sep 2023 10:23:44 -0500 Subject: [PATCH 2/3] docs: update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e54f641..cf99e5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Ensure dabatase directory exists before create migration. ([49](https://github.com/barbosa89/phenix/pull/49)) + # Release Notes for 0.1.x ## [v0.2.0 (2023-09-29)](https://github.com/barbosa89/phenix/compare/0.2.0...0.1.0) From 012ffd9e0936a78b85fe06f3f76d061af0fd331c Mon Sep 17 00:00:00 2001 From: Barbosa Date: Sat, 30 Sep 2023 10:25:51 -0500 Subject: [PATCH 3/3] docs: update changelog --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf99e5b..2245888 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +# Release Notes for 0.1.x + +## [v0.2.1 (2023-09-30)](https://github.com/barbosa89/phenix/compare/0.2.1...0.2.0) + ### Fixed - Ensure dabatase directory exists before create migration. ([49](https://github.com/barbosa89/phenix/pull/49)) -# Release Notes for 0.1.x - ## [v0.2.0 (2023-09-29)](https://github.com/barbosa89/phenix/compare/0.2.0...0.1.0) ### Added