Files
moonshineandClaude Opus 5.5 bbd81f6137 setup-project-foundation: Next.js 16 + SQLite scaffold (WIP)
- Next.js 16 App Router (TS strict, src/), minimal placeholder page
- ESLint (domain/ may not import server/ or next) + Prettier
- SQLite via better-sqlite3 + Drizzle: WAL/foreign_keys/busy_timeout,
  migrations, idempotent seed, withTransaction (BEGIN IMMEDIATE)
- Zod-validated env; startup exits on bad config and creates attachments dir
- Vitest unit/integration tests with temp-DB helper (12 passing)
- Playwright config + home e2e test (not yet verified passing)

Tasks 1.1-5.1 done; 5.2, 6.x, 7.x pending.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 18:06:31 +08:00

10 lines
298 B
TypeScript

import "./load-env";
import { getDatabase } from "@/server/db/client";
import { runMigrations } from "@/server/db/migrate";
import { getEnv } from "@/server/env";
const { db, sqlite } = getDatabase();
runMigrations(db);
console.log(`migration 完成:${getEnv().DATABASE_PATH}`);
sqlite.close();