Releases: mabulu-inc/simplicity-schema-std
Releases · mabulu-inc/simplicity-schema-std
v0.1.0
Added
lenient_gucaudit parameter (defaultapp.audit_lenient). When this GUC
is'true',audit_stamptolerates a missing actor and leaves
created_by/updated_byNULL instead of raising — the opt-in for bootstrap
seeding, where a back-fill resolves the NULLs before theNOT NULLtighten.
Changed
audit_stampnow refuses actor-less writes with a clear, named error. A
write to an audited table with no actor GUC set previously landedcreated_by
NULL and surfaced only as a bareNOT NULLviolation (or silently, while the
columns were still nullable). It now raisesaudit_stamp: <actor_guc> is not set; refusing to write to <schema>.<table>with a hint, so a forgotten
session / service context fails loudly at the source. Bootstrap seeding opts
out via the newlenient_guc(run the seed transactions with
bootstrapSession: { 'app.audit_lenient': 'true' }).
v0.0.2
Added
- The documentation site now shows the released version as a badge in its
header, linking to the matching GitHub release. The version is derived from
the package version at build time, so it always reflects the current release.
v0.0.1
Added
- Standard schema building blocks. Parameterized mixins —
audit
(created/updated timestamps + actor attribution),audit_log(field-level
change history),timestamps(actor-free created/updated), andsoft_delete
— plus theaudit_stamp/audit_diff/audit_skip_noop/
timestamps_stamptrigger functions and the append-onlyaudit_logtable.
Each app supplies its own identity table and actor GUC via schema-flow
importsparams (user_table/user_pk/actor_guc, defaulting to
users/user_id/app.actor_id), so the package depends on no app's
data model. - Bootstrap back-fill helper.
audit_backfill_by(p_actor)fills NULL
created_by/updated_byleft by actor-less seeds (so the post-seed
NOT NULLtighten passes), attributing them to a fallback identity the app
supplies. Call it from apost/script — or avoid it entirely by pre-setting
a sentinel actor for the bootstrap. - End-to-end test suite. Applies the real shipped schema through
schema-flowimports+paramsagainst a throwaway Postgres (docker
compose), asserting both structure and audit/timestamp/soft-delete behavior.