mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-06-04 07:46:21 +02:00
63 lines
1.4 KiB
TypeScript
63 lines
1.4 KiB
TypeScript
import MigrationsBase from './Base';
|
|
/**
|
|
* The command is meant to migrate the database by executing migrations
|
|
* in `down` direction.
|
|
*/
|
|
export default class Migrate extends MigrationsBase {
|
|
static commandName: string;
|
|
static description: string;
|
|
static settings: {
|
|
loadApp: boolean;
|
|
};
|
|
private migrator;
|
|
/**
|
|
* Custom connection for running migrations.
|
|
*/
|
|
connection: string;
|
|
/**
|
|
* Force run migrations in production
|
|
*/
|
|
force: boolean;
|
|
/**
|
|
* Perform dry run
|
|
*/
|
|
dryRun: boolean;
|
|
/**
|
|
* Define custom batch, instead of rolling back to the latest batch
|
|
*/
|
|
batch: number;
|
|
/**
|
|
* Display migrations result in one compact single-line output
|
|
*/
|
|
compactOutput: boolean;
|
|
/**
|
|
* Disable advisory locks
|
|
*/
|
|
disableLocks: boolean;
|
|
/**
|
|
* Instantiating the migrator instance
|
|
*/
|
|
private instantiateMigrator;
|
|
/**
|
|
* Run as a subcommand. Never close database connections or exit
|
|
* process inside this method
|
|
*/
|
|
private runAsSubCommand;
|
|
/**
|
|
* Branching out, so that if required we can implement
|
|
* "runAsMain" separately from "runAsSubCommand".
|
|
*
|
|
* For now, they both are the same
|
|
*/
|
|
private runAsMain;
|
|
/**
|
|
* Handle command
|
|
*/
|
|
run(): Promise<void>;
|
|
/**
|
|
* Lifecycle method invoked by ace after the "run"
|
|
* method.
|
|
*/
|
|
completed(): Promise<void>;
|
|
}
|