Commit Graph

10 Commits

Author SHA1 Message Date
yukkop 1d1c28f7f3 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
yukkop 908bc96aeb feat(nixos): lenovo hardware 2025-10-16 12:22:19 +00:00
yukkop 5d85a6ddd3 fix: lib systems 2025-10-16 09:52:49 +00:00
yukkop 7896589fac feat(nixos): module: +support-bot 2025-08-28 15:02:58 +00:00
yukkop 46763ff6da feat(lib): shell: local-dir 2025-07-22 21:15:42 +00:00
yukkop 02a5b42ef2 fix(lib): shell: remove unneccessary ''$ 2025-07-18 03:23:25 +00:00
yukkop 52930f2bd6 feat(lib): shell: +check-tool 2025-07-17 16:22:31 +00:00
yukkop f32ff17cea fix(lib): logs: mkdir error work around 2025-07-17 16:17:43 +00:00
yukkop 6d7217e8f9 refactor: pull out systems 2025-07-17 15:21:06 +00:00
yukkop f9d37f0bdd feat: modules 2025-07-17 13:37:33 +00:00