chore: 服务启动不再自动迁移数据库

schema 变更改为显式 db:push / 手动应用后再启动。
This commit is contained in:
2026-10-12 13:57:25 +08:00
parent f4f5ed0b0f
commit d0bab545b1
4 changed files with 6 additions and 21 deletions
+1 -8
View File
@@ -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({