From 2c00b74cc02b55e26d68fef108596aae56080d5a Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sat, 8 Aug 2026 10:05:05 +0200 Subject: feat: Persist Cotacol ride values --- db/migrations/20260807000000_ride_cotacol.sql | 7 +++++++ db/schema.sql | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 db/migrations/20260807000000_ride_cotacol.sql (limited to 'db') diff --git a/db/migrations/20260807000000_ride_cotacol.sql b/db/migrations/20260807000000_ride_cotacol.sql new file mode 100644 index 0000000..44e3a81 --- /dev/null +++ b/db/migrations/20260807000000_ride_cotacol.sql @@ -0,0 +1,7 @@ +-- migrate:up +alter table rides add column cotacol_score real; +alter table rides add column cotacol_algo_version text; + +-- migrate:down +alter table rides drop column cotacol_algo_version; +alter table rides drop column cotacol_score; diff --git a/db/schema.sql b/db/schema.sql index 6a22bc5..1a3d62a 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -27,6 +27,8 @@ CREATE TABLE rides ( elapsed_time_s integer not null, total_elevation_gain_m real not null, average_speed_mps real not null, + cotacol_score real, + cotacol_algo_version text, created_at text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')), updated_at text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')) ); @@ -34,4 +36,5 @@ CREATE TABLE rides ( INSERT INTO "schema_migrations" (version) VALUES ('20250802140659'), ('20260802090000'), - ('20260804000000'); + ('20260804000000'), + ('20260807000000'); -- cgit v1.2.3