feat: add direct PostgreSQL and ACK deployment support

This commit is contained in:
2026-08-12 19:12:00 +08:00
parent d0192081c7
commit c44274f098
55 changed files with 3317 additions and 1064 deletions

View File

@@ -0,0 +1,14 @@
import { readFile } from "node:fs/promises";
import { describe, expect, it } from "vitest";
describe("PostgreSQL account script concurrency contract", () => {
it("serializes bootstrap and legacy imports that target the same logical account", async () => {
const [bootstrap, legacyImport] = await Promise.all([
readFile(new URL("../scripts/bootstrap-admin.mjs", import.meta.url), "utf8"),
readFile(new URL("../scripts/import-legacy-accounts.mjs", import.meta.url), "utf8")
]);
expect(bootstrap).toContain("pg_advisory_xact_lock");
expect(legacyImport).toContain("pg_advisory_xact_lock(hashtextextended($1, 0))");
expect(legacyImport).toContain("session_version=platform_users.session_version+1");
});
});