feat(ledger): add bookkeeping workbench and transaction views
- Add transactions_dirty table and zero-tolerance cleansing action - Implement bookkeeping workbench (/bookkeeping) with searchable Combobox channel selector and card suffix / account identifier - Implement transaction ledger (/transactions) with date groupings, multi-currency metrics, and filters - Update AGENTS.md guidelines for Base UI Select and Combobox bindings
This commit is contained in:
+11
-9
@@ -1,15 +1,17 @@
|
||||
import { drizzle } from "drizzle-orm/postgres-js";
|
||||
import postgres from "postgres";
|
||||
import * as schema from "./schema";
|
||||
import { drizzle } from "drizzle-orm/postgres-js"
|
||||
import postgres from "postgres"
|
||||
import * as schema from "./schema"
|
||||
|
||||
const connectionString = process.env.DATABASE_URL || "postgresql://postgres:Aa110011@localhost:5432/fluxent";
|
||||
const connectionString =
|
||||
process.env.DATABASE_URL ||
|
||||
"postgresql://postgres:Aa110011@localhost:5432/fluxent"
|
||||
|
||||
// 在 Next.js 开发环境下避免热重载创建重复连接池
|
||||
const globalForDb = globalThis as unknown as {
|
||||
conn: postgres.Sql | undefined;
|
||||
};
|
||||
conn: postgres.Sql | undefined
|
||||
}
|
||||
|
||||
const client = globalForDb.conn ?? postgres(connectionString, { max: 10 });
|
||||
if (process.env.NODE_ENV !== "production") globalForDb.conn = client;
|
||||
const client = globalForDb.conn ?? postgres(connectionString, { max: 10 })
|
||||
if (process.env.NODE_ENV !== "production") globalForDb.conn = client
|
||||
|
||||
export const db = drizzle(client, { schema });
|
||||
export const db = drizzle(client, { schema })
|
||||
|
||||
Reference in New Issue
Block a user