fix: 加固认证撤销与运行配置

This commit is contained in:
root
2026-09-14 20:05:40 +08:00
parent c708205084
commit 6b453af364
13 changed files with 397 additions and 26 deletions
+13
View File
@@ -93,6 +93,19 @@ describe("database authority constraints", () => {
).toBe(true);
});
it("backfills and requires the session token version snapshot", async () => {
const columns = await prisma.$queryRaw<
Array<{ is_nullable: string; column_default: string | null }>
>`
SELECT is_nullable, column_default FROM information_schema.columns
WHERE table_schema = 'public' AND table_name = 'sessions' AND column_name = 'token_version'`;
expect(columns).toHaveLength(1);
expect(columns[0]).toMatchObject({
is_nullable: "NO",
column_default: "0",
});
});
it("expresses independent moderation and pool lifecycle state", async () => {
const author = await createAccount("states");
const bottle = await prisma.bottle.create({