chore: 服务启动不再自动迁移数据库
schema 变更改为显式 db:push / 手动应用后再启动。
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { appLogger, setupLogging } from "@new-api-key-usage/core";
|
||||
import { createDb, createRepos, runMigrations } from "@new-api-key-usage/db";
|
||||
import { createDb, createRepos } from "@new-api-key-usage/db";
|
||||
import { loadEnv } from "./env.ts";
|
||||
import { createSyncLoop } from "./loop.ts";
|
||||
|
||||
@@ -10,12 +9,6 @@ const log = appLogger("engine");
|
||||
|
||||
const db = createDb(env.DATABASE_URL);
|
||||
|
||||
const migrationsFolder =
|
||||
process.env.MIGRATIONS_FOLDER ??
|
||||
fileURLToPath(new URL("../../../packages/db/drizzle", import.meta.url));
|
||||
await runMigrations(db, migrationsFolder);
|
||||
log.info("数据库迁移已就绪");
|
||||
|
||||
const repos = createRepos(db);
|
||||
|
||||
const loop = createSyncLoop({
|
||||
|
||||
Reference in New Issue
Block a user