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>
12 lines
634 B
SQL
12 lines
634 B
SQL
-- 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);
|