aboutsummaryrefslogtreecommitdiff
path: root/db/migrations
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-09-25 08:46:58 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-09-25 08:46:58 +0200
commit077aa1700fbcaf3f499c2178e0e58e89ae9dcaf8 (patch)
tree020d0d8b34ab7b47cf551b50034c1e086a247af3 /db/migrations
parent90614736f2a0c556f31eca5361b3c032f5f309f6 (diff)
Chart power vs time for official climb attempts
Snapshot average power per attempt in a nullable average_power_w column (backfilled from stored rides), plot each powered attempt on the climb page as duration vs average watts with ride hover and click-through, and show avg power in the attempts table.
Diffstat (limited to 'db/migrations')
-rw-r--r--db/migrations/20260925061236_ride_official_climb_attempts_average_power.sql6
1 files changed, 6 insertions, 0 deletions
diff --git a/db/migrations/20260925061236_ride_official_climb_attempts_average_power.sql b/db/migrations/20260925061236_ride_official_climb_attempts_average_power.sql
new file mode 100644
index 0000000..e0c4bf1
--- /dev/null
+++ b/db/migrations/20260925061236_ride_official_climb_attempts_average_power.sql
@@ -0,0 +1,6 @@
+-- Average power over the attempt interval; null for rides without a power meter.
+-- migrate:up
+ALTER TABLE ride_official_climb_attempts ADD COLUMN average_power_w real;
+
+-- migrate:down
+ALTER TABLE ride_official_climb_attempts DROP COLUMN average_power_w;