diff --git a/src/commands/MigrationGenerateCommand.ts b/src/commands/MigrationGenerateCommand.ts index a17005ca2d..cdb098c299 100644 --- a/src/commands/MigrationGenerateCommand.ts +++ b/src/commands/MigrationGenerateCommand.ts @@ -28,7 +28,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", @@ -121,7 +122,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`));