Initial commit: smartrun MVP
Garmin run classification and progression tracker. Go backend (MCP client to mcp-garmin, SQLite store, deterministic rule engine, REST API) and React/TS frontend (Dashboard, Review Queue, Workout Kinds). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
11
backend/internal/store/migrations/0002_sync_state.sql
Normal file
11
backend/internal/store/migrations/0002_sync_state.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- Tracks how far back a full backfill has already reached. Garmin activity
|
||||
-- history is immutable once recorded, so once we've backfilled a historical
|
||||
-- window there is no need to ever re-fetch get_activities() for it again --
|
||||
-- this is the "cache" that lets repeated backfills be cheap/fast instead of
|
||||
-- re-walking years of history against Garmin's API every time.
|
||||
CREATE TABLE sync_state (
|
||||
id INTEGER PRIMARY KEY CHECK (id = 1),
|
||||
earliest_synced_date TEXT,
|
||||
backfill_complete INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
INSERT INTO sync_state (id, earliest_synced_date, backfill_complete) VALUES (1, NULL, 0);
|
||||
Reference in New Issue
Block a user