feat(database): update migration command to use migrateCli and separate migration logic
This commit is contained in:
@@ -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);
|
||||
});
|
||||
Reference in New Issue
Block a user