diff --git a/backend/internal/store/profile_test.go b/backend/internal/store/profile_test.go index 67eb157..137bc4d 100644 --- a/backend/internal/store/profile_test.go +++ b/backend/internal/store/profile_test.go @@ -26,8 +26,8 @@ func TestProfile_DefaultsThenUpdate(t *testing.T) { if p.WarmupMinutes != 10 || p.CooldownMinutes != 5 { t.Errorf("phase-minute defaults = %+v, want warmup=10, cooldown=5", p) } - if p.BackfillHorizonDays != 1095 { - t.Errorf("BackfillHorizonDays = %d, want 1095 (migration default)", p.BackfillHorizonDays) + if p.BackfillHorizonDays != 90 { + t.Errorf("BackfillHorizonDays = %d, want 90 (schema default)", p.BackfillHorizonDays) } if p.MinRepresentativePaceSecPerKm != 720 || p.MinRepresentativeTimeSeconds != 3 { t.Errorf("pace artifact filter defaults = %+v, want pace=720, time=3", p) diff --git a/backend/internal/store/schema.sql b/backend/internal/store/schema.sql index 3ad9695..1a9272c 100644 --- a/backend/internal/store/schema.sql +++ b/backend/internal/store/schema.sql @@ -40,7 +40,7 @@ CREATE TABLE profile ( -- BackfillHorizonDays bounds how far back "Sync now" reaches when -- walking backward from today; read fresh on every sync (not cached at -- server startup), so changing it here takes effect on the next click. - backfill_horizon_days INTEGER NOT NULL DEFAULT 1095, + backfill_horizon_days INTEGER NOT NULL DEFAULT 90, max_heart_rate REAL, resting_heart_rate REAL, hr_zone1_min_pct REAL NOT NULL DEFAULT 50, diff --git a/docs/DATABASE.md b/docs/DATABASE.md index cbfd0b3..9e41b1a 100644 --- a/docs/DATABASE.md +++ b/docs/DATABASE.md @@ -45,7 +45,7 @@ CREATE TABLE profile ( -- BackfillHorizonDays bounds how far back "Sync now" reaches when -- walking backward from today; read fresh on every sync (not cached at -- server startup), so changing it here takes effect on the next click. - backfill_horizon_days INTEGER NOT NULL DEFAULT 1095, + backfill_horizon_days INTEGER NOT NULL DEFAULT 90, max_heart_rate REAL, resting_heart_rate REAL, hr_zone1_min_pct REAL NOT NULL DEFAULT 50,