Skip to main content

SQLITE_DDL_V3

Constant SQLITE_DDL_V3 

Source
pub const SQLITE_DDL_V3: &[(&str, &str)];
Expand description

SQLite DDL for the auth schema, version 3 — Zanzibar / ReBAC.

Mirrors PG_DDL_V3 with JSONBTEXT (caller round-trips via serde_json), DOUBLE PRECISIONREAL. SQLite’s default CURRENT_TIMESTAMP returns a string, not a unix epoch double, so the SQLite store binds the timestamp explicitly on every insert (matches the rest of the auth schema’s discipline).

Treats subject_rel exactly as PG does: empty string for direct subjects, relation name for usersets. The empty-string sentinel avoids the NULL-vs-PK-NOT-NULL conflict the original schema had (see PG DDL note above).