mirror of
https://github.com/hanzoai/insights.git
synced 2026-10-30 16:15:31 +00:00
bin/debrand held `insights_hogflow` and `insights_hogfunction` in
PRESERVE_IDENT as physical identities -- names the database owns, not
labels we may rename. That was true when it was written. It stopped being
true when the tables were renamed and the compatibility views that stood
in for them were dropped, and nothing went back to check.
Against the live database, all four legacy names now answer NULL to
to_regclass, and selecting from one raises `relation does not exist`.
Meanwhile the nodejs CDP service was still issuing:
SELECT ... FROM insights_hogfunction WHERE enabled = TRUE ...
SELECT ... FROM insights_hogfunctiontemplate WHERE template_id = ...
SELECT ... FROM insights_hogflow WHERE status = 'active' ...
-- the function manager, the template manager and the flow manager, which
is how the workers learn what to run. The InsightsQL system schema pointed
`system.hog_flows` and its function sibling at the same dead names, and
two management commands did too. Nothing surfaced because both tables are
empty; the templates table is not, and it holds 79 rows.
Each query now names the table it meant, and each was run against
production to prove it: seven repointed shapes execute, three legacy
names raise. The InsightsQL view keeps its own name -- `system.hog_flows`
is the label a customer types and is preserved deliberately; only the
`postgres_table_name` underneath it moved.
Co-authored-by: Hanzo Dev <[email protected]>