Version: 4.3

Class: MigrationCommandFactory

Hierarchy

  • MigrationCommandFactory

Methods

configureCreateCommand

Static PrivateconfigureCreateCommand(args: Argv): void

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:57

Parameters:

NameType
argsArgv

Returns: void


configureMigrationCommand

StaticconfigureMigrationCommand(args: Argv, method: MigratorMethod): Argv<{}>

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:27

Parameters:

NameType
argsArgv
methodMigratorMethod

Returns: Argv<{}>


configureUpDownCommand

Static PrivateconfigureUpDownCommand(args: Argv, method: MigratorMethod): void

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:39

Parameters:

NameType
argsArgv
methodMigratorMethod

Returns: void


create

Staticcreate<U>(command: MigratorMethod): CommandModule<unknown, U> & { builder: (args: Argv) => Argv<U> ; handler: (args: Arguments<U>) => Promise<void> }

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:18

Type parameters:

NameTypeDefault
UOptionsOptions

Parameters:

NameType
commandMigratorMethod

Returns: CommandModule<unknown, U> & { builder: (args: Argv) => Argv<U> ; handler: (args: Arguments<U>) => Promise<void> }


getUpDownOptions

Static PrivategetUpDownOptions(flags: CliUpDownOptions): MigrateOptions

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:144

Parameters:

NameType
flagsCliUpDownOptions

Returns: MigrateOptions


getUpDownSuccessMessage

Static PrivategetUpDownSuccessMessage(method: "up" | "down", options: MigrateOptions): string

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:156

Parameters:

NameType
method"up" | "down"
optionsMigrateOptions

Returns: string


handleCreateCommand

Static PrivatehandleCreateCommand(migrator: Migrator, args: Arguments<Options>, config: Configuration): Promise<void>

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:129

Parameters:

NameType
migratorMigrator
argsArguments<Options>
configConfiguration

Returns: Promise<void>


handleListCommand

Static PrivatehandleListCommand(migrator: Migrator): Promise<void>

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:119

Parameters:

NameType
migratorMigrator

Returns: Promise<void>


handleMigrationCommand

StatichandleMigrationCommand(args: Arguments<Options>, method: MigratorMethod): Promise<void>

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:80

Parameters:

NameType
argsArguments<Options>
methodMigratorMethod

Returns: Promise<void>


handlePendingCommand

Static PrivatehandlePendingCommand(migrator: Migrator): Promise<void>

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:110

Parameters:

NameType
migratorMigrator

Returns: Promise<void>


handleUpDownCommand

Static PrivatehandleUpDownCommand(args: Arguments<Options>, migrator: Migrator, method: MigratorMethod): Promise<void>

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:103

Parameters:

NameType
argsArguments<Options>
migratorMigrator
methodMigratorMethod

Returns: Promise<void>

Object literals

DESCRIPTIONS

Static Readonly DESCRIPTIONS: object

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:10

Properties:

NameTypeValue
createstring"Create new migration with current schema diff"
downstring"Migrate one step down"
liststring"List all executed migrations"
pendingstring"List all pending migrations"
upstring"Migrate up to the latest version"
Last updated on by Martin Adámek