You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(db): make purchase_history.ramp_step and purchase_executions.error NOT NULL #1484
Problem: two columns are nullable in the schema, but the Go scanners read them into plain values. The Go writers never store NULL, so a NULL can only come from a legacy row or a hand-written SQL row. When one appears, the whole listing fails to scan.
purchase_history.ramp_step is a nullable INTEGER scanned into a plain int (internal/config/types.go ~1042, store_postgres.go ~2816). Seeding a NULL breaks GetAllPurchaseHistory.
Fix at the root: one migration, numbered above main's highest at merge time, that:
backfills NULL to 0 for ramp_step and to '' for error;
sets both columns to NOT NULL DEFAULT.
Include a real-Postgres migration test (up and down) and a check that existing rows survive. Until it lands, scan ramp_step through sql.NullInt32, the same way #1473 handles error.
Activity
IAmJSD commentedon Oct 26, 2026
Claiming: working on this
fix(db): make purchase_history.ramp_step and purchase_executions.erro…