Skip to content

Commit

Permalink
fix: update error message text for generate migration command when mi…
Browse files Browse the repository at this point in the history
…ssing name argument

enforce the type of the name argument in order to return a more useful error message when the user forgets to provide a migration name to the generate migration command

Closes: typeorm#2719, typeorm#4798, typeorm#4805
  • Loading branch information
Akosua Asante committed Sep 9, 2020
1 parent 28745ac commit d691893
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/MigrationGenerateCommand.ts
Expand Up @@ -105,7 +105,7 @@ export class MigrationGenerateCommand implements yargs.CommandModule {

console.log(chalk.green(`Migration ${chalk.blue(path)} has been generated successfully.`));
} else {
console.log(chalk.yellow("Please specify migration name"));
console.log(chalk.yellow("Please specify a migration name using the `-n` argument"));
}
} else {
console.log(chalk.yellow(`No changes in database schema were found - cannot generate a migration. To create a new empty migration use "typeorm migration:create" command`));
Expand Down

0 comments on commit d691893

Please sign in to comment.