Skip to content

Commit

Permalink
Revise a message for migrations (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
cable8mm authored Jan 4, 2025
1 parent 1b7bb63 commit 275e13d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/Command/GenerateMigrationsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Cable8mm\Xeed\Generators\MigrationGenerator;
use Cable8mm\Xeed\Mergers\MergerContainer;
use Cable8mm\Xeed\Support\Path;
use Cable8mm\Xeed\Xeed;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
Expand Down Expand Up @@ -68,9 +67,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
MergerContainer::getEngines()
)->run(force: $force);

$output->writeln('<info>'.Path::migration().DIRECTORY_SEPARATOR.$table->migration().' has been generated.'.'</info>');
$output->writeln('<info>A migration file for '.$table.' table has been generated.</info>');
} catch (\RuntimeException $e) {
$output->writeln('<error>'.Path::migration().DIRECTORY_SEPARATOR.$table->migration().'.php file already exists.'.'</error>');
$output->writeln('<error>'.$e->getMessage().'</error>');
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Laravel/Commands/GenerateMigrationsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public function handle(Xeed $xeed)
MergerContainer::getEngines()
)->run(force: $force);

$this->info(database_path('migrations').DIRECTORY_SEPARATOR.$table->factory().'.php has been generated.');
$this->info('A migration file for '.$table.' table has been generated.');
} catch (\Exception $e) {
$this->error(database_path('migrations').DIRECTORY_SEPARATOR.$table->factory().'.php file already exists.');
$this->error($e->getMessage());
}
}

Expand Down

0 comments on commit 275e13d

Please sign in to comment.