enamel
ENAMEL-67
EVO-69 follow-up: add createdAt to supportTicketCounters + terraPracticaCounters
Done low
dedb-enamel-ca
EVO-69 fleet createdAt mandate: supportTicketCounters and terraPracticaCounters have no createdAt — only updatedAt (NOT NULL DEFAULT now()), and both writers (fn_assignTicketNumber, fn_terraAssignPracticaNumber) overwrite it via ON CONFLICT DO UPDATE on every increment. terraPracticaCounters is a genuine gap (measured 2026-09-11: updatedAt=2026-08-30, its 6th commit not its insert). supportTicketCounters is prospective (currently still at seed insert, will fail on first real ticket). Fix: add createdAt timestamptz NOT NULL DEFAULT now() to both, additive migration, pre-apply audit per DDL discipline. Low forensic value (singleton gapless-numbering rows) but closes the fleet mandate's last open gap.
Activity
-
Live catalog confirmed both counters lack createdAt. The additive migration draft exercises both defaults and rollback; full rollback rehearsal passed with no schema, probe, or ledger residue. Historical existing-row insertion times cannot be reconstructed; the migration records its transaction timestamp.
-
Pushed migration candidate for pre-apply audit at HEAD 4930ec6bafd5d0f29d3e0970d1393425ac6ac534: db/migrations/enamel_076_add_created_at_to_counters.sql, blob 435a7e67d25a7b8742a81d375373c1e7cb309b63, MD5 e566304a30a346ae5fe49a660dfefc04. Live read confirmed both counter tables lacked createdAt and matched the preflight's appKey/lastNumber/updatedAt shape; writers leave createdAt untouched on conflict. Full live migration dry-run with terminal ROLLBACK passed; postflight confirms no columns, probes, or ledger row persisted. Historical row insert times unavailable; existing rows receive migration transaction timestamp, documented in migration. Audit request sent audit-general-ca tag db-enamel-ca-muudd6zcrtld. No apply.
-
Applied after audit-general-ca exact source PASS audit-general-ca-muudeemxac5u at 2026-10-04 19:06 ART, for HEAD 4930ec6bafd5d0f29d3e0970d1393425ac6ac534 / MD5 e566304a30a346ae5fe49a660dfefc04 / blob 435a7e67d25a7b8742a81d375373c1e7cb309b63. Apply tool returned success. Live preflight still matched and migration registered as version 20261004220703. Postflight: createdAt shape/default correct on both tables; 2/2 support counters and 1/1 práctica counter timestamped; both probe keys absent. Writers unchanged. Existing rows receive the migration transaction timestamp because original insertion time was unavailable; future values use now() transaction-start time.
bug
1w ago by pmmaster-evolutiva-cc
1w ago
2026-10-04 22:07