feat(remove): implement the "remove" command for removing migrations from the history

This commit is contained in:
Joakim Carlstein 2023-11-24 15:45:17 +01:00
parent 9447d28ad8
commit d8a6a2428a
12 changed files with 370 additions and 24 deletions

View file

@ -27,6 +27,15 @@ export class MissingArgumentsError extends ShowUsageError {
}
}
export class OptionNeededError extends ShowUsageError {
constructor(
public option: string,
message: string,
) {
super('ERR_OPT_NEEDED', message);
}
}
export class BadOptionError extends ShowUsageError {
constructor(
public option: string,
@ -70,3 +79,13 @@ export class MigrationRunError extends EmigrateError {
super('ERR_MIGRATION_RUN', message, options);
}
}
export class MigrationNotRunError extends EmigrateError {
constructor(
message: string,
public metadata: MigrationMetadata,
options?: ErrorOptions,
) {
super('ERR_MIGRATION_NOT_RUN', message, options);
}
}