MigrateCommand constructor
MigrateCommand(
- CommandContextFactory commandContextFactory
Implementation
MigrateCommand(super.commandContextFactory)
{
addArgument(migrationIdentityArg,
help: 'The identity of the migration in the format as you name it in the '
'migrations directory.\n'
'${bold('Optional')}.\n'
'If specified, the database will be migrated up to this version. '
'Otherwise, the database will be migrated up to the latest version in '
'the migrations directory.'
);
argParser.addFlag(rollbackFlag,
abbr: 'r',
help: 'Allow to rollback the migrations already applied to the database. '
'${bold('Optional')}.\n'
'It is ${bold('on')} by default, which means all migrations that absent '
'or differ from local ones will be rolled back before applying new '
'migrations. It is not recommended to allow rollback in production '
'environment.',
defaultsTo: rollbackByDefault,
);
}