feat(database): update migration command to use migrateCli and separate migration logic

This commit is contained in:
MythEclipse
2026-05-31 23:10:28 +07:00
parent 7607282db2
commit c2d5bde633
3 changed files with 15 additions and 13 deletions
+14
View File
@@ -0,0 +1,14 @@
import { createChildLogger } from "../logger.js";
import { runMigrations } from "./migrate.js";
const logger = createChildLogger("migrate-cli");
runMigrations()
.then(() => {
logger.info("Migrations completed");
process.exit(0);
})
.catch((error) => {
logger.error({ error }, "Migration failed");
process.exit(1);
});