feat: add direct PostgreSQL and ACK deployment support
This commit is contained in:
1 parent
d0192081c7
commit
c44274f098
55 files changed
+3317
-1064
No files matched your search
@@ -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)");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user