feat: add direct PostgreSQL and ACK deployment support

This commit is contained in:
brother7 committed 2026-08-12 19:20:07 +08:00
1 parent d0192081c7
commit c44274f098
55 files changed
+3317 -1064

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { readFile } from "node:fs/promises";
import { describe, expect, it } from "vitest";
describe("PostgreSQL readiness contract", () => {
it("checks every runtime table and both atomic functions", async () => {
const source = await readFile(new URL("../lib/server/database.ts", import.meta.url), "utf8");
for (const table of [
"assets",
"generation_jobs",
"usage_events",
"projects",
"image_templates",
"platform_organizations",
"platform_users",
"platform_account_migrations",
"billing_price_rules",
"billing_wallets",
"billing_ledger"
]) {
expect(source).toContain(`('${table}',`);
}
expect(source).toContain("claim_generation_jobs(text,integer,integer)");
expect(source).toContain("billing_post_wallet_entry(text,text,text,text,text,bigint,text,text,text,jsonb)");
});
});