13 Commits

Author SHA1 Message Date
d3cdbdf3e2 docs(postgres-hooks): document hectic bundle + responsibility split
Add lib/hook/sql/README.md describing bundle layout, apply order, Nix API
(self.lib.hectic.*), shell helper contract, and the steps for adding a new
SQL file. Rewrite db-tool README's hectic section: drop stale
PG_HECTIC_INHERITANCE / HECTIC_INHERITANCE_SQL env vars, add
HECTIC_DOTENV_FILE, document the postgres-init / migrator init / database
hydrate responsibility split.
2026-04-30 22:12:18 +00:00
3d5e3fdb36 feat: postgres hooks 2026-04-30 21:59:53 +00:00
bf7ee34716 feat: start impliment postgres hooks 2026-04-30 21:36:22 +00:00
58e9aa8fad feat(db-tool): hectic-inheritance: bootstrap hectic.created_at / hectic.updated_at inheritance hook
Adds a SQL bundle plus event triggers that enforce `INHERITS (hectic.created_at)`
on every user CREATE TABLE and auto-attach a BEFORE UPDATE row trigger when a
table inherits `hectic.updated_at`. Always-exempt: `hectic`, `information_schema`,
`pg_*`, declarative partitions, temp tables. Per-DB opt-out via the GUC
`hectic.inheritance_extra_excluded_schemas`.

Exposed three ways:
  * `pkgs.hectic.hectic-inheritance` — derivation with the SQL at
    $out/share/hectic/hectic-inheritance.sql
  * `self.lib.hecticInheritance.{sql,path}` — pkgs-free Nix surface
  * `postgres-init` opt-in via `PG_HECTIC_INHERITANCE=1` (HECTIC_INHERITANCE_SQL
    overrides the default)

Test postgres-init-hectic-inheritance covers all six branches: bootstrap,
non-inheriting reject, accepting inheritance, auto updated_at trigger fires,
GUC exclusion, declarative partition exemption.
2026-04-30 15:16:57 +00:00
abdc808693 feat(nixos): lenovo hardware 2025-10-16 12:22:19 +00:00
3139fd1d9f fix: lib systems 2025-10-16 09:52:49 +00:00
00e02f328a feat(nixos): module: +support-bot 2025-08-28 15:02:58 +00:00
6e77853453 feat(lib): shell: local-dir 2025-07-22 21:15:42 +00:00
e74ef30dc6 fix(lib): shell: remove unneccessary ''$ 2025-07-18 03:23:25 +00:00
92def64fea feat(lib): shell: +check-tool 2025-07-17 16:22:31 +00:00
be3aab9b48 fix(lib): logs: mkdir error work around 2025-07-17 16:17:43 +00:00
23d9db27e6 refactor: pull out systems 2025-07-17 15:21:06 +00:00
20dcbdfdc4 feat: modules 2025-07-17 13:37:33 +00:00