Skip to content

Commit

Permalink
Merge pull request #50 from barbosa89/release/0.2.1
Browse files Browse the repository at this point in the history
Release/0.2.1
  • Loading branch information
barbosa89 authored Sep 30, 2023
2 parents 68e3213 + fcd711d commit c497f66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

# 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))

## [v0.2.0 (2023-09-29)](https://github.com/barbosa89/phenix/compare/0.2.0...0.1.0)

### Added
Expand Down
5 changes: 5 additions & 0 deletions core/Database/Console/MakeMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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'));
Expand Down

0 comments on commit c497f66

Please sign in to comment.