Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX #2719: enforce name argument of migration generate command #6690

Merged
merged 2 commits into from Sep 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/commands/MigrationGenerateCommand.ts
Expand Up @@ -27,7 +27,8 @@ export class MigrationGenerateCommand implements yargs.CommandModule {
.option("n", {
alias: "name",
describe: "Name of the migration class.",
demand: true
demand: true,
type: "string"
})
.option("d", {
alias: "dir",
Expand Down Expand Up @@ -104,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