mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-05 05:05:08 +02:00
fix: inline Phase 4A cleanup in migration 003
The duration_reasonable CHECK constraint fails on existing rows with 56-year durations from the shell var bug. Move the prerequisite UPDATE into the migration itself so it's self-contained. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
-- gstack telemetry data integrity + growth metrics
|
||||
-- Adds source tagging, install fingerprinting, duration guards, and growth views.
|
||||
--
|
||||
-- PREREQUISITE: Run Phase 4A cleanup BEFORE this migration:
|
||||
-- UPDATE telemetry_events SET duration_s = NULL WHERE duration_s > 86400 OR duration_s < 0;
|
||||
-- ─── Phase 4A cleanup (inline — fixes 56-year durations from shell var bug) ──
|
||||
UPDATE telemetry_events SET duration_s = NULL WHERE duration_s > 86400 OR duration_s < 0;
|
||||
|
||||
-- ─── Source field (live/test/dev tagging) ─────────────────────
|
||||
ALTER TABLE telemetry_events ADD COLUMN source TEXT DEFAULT 'live';
|
||||
|
||||
Reference in New Issue
Block a user