mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-30 10:58:07 +03:00
fix: Remove migrations from pending when they fail
This commit is contained in:
@@ -166,6 +166,9 @@ export async function ApplyMigration(migrationID: string) {
|
||||
);
|
||||
}
|
||||
|
||||
// remove the stale migration so it can be re-ran in the future.
|
||||
await db.migrations.findOneAndDelete({ migrationID });
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user