v1.2.0:5 — Gear (breathing, 1-5) replaces RPE as the effort field for cardio
Cardio exercises now log a breathing "Gear" (1-5, per Brian MacKenzie) instead of RPE (6-10) as their effort field; strength keeps RPE. An exercise counts as cardio when its equipment type is "cardio" or it carries the "cardio" muscle group (isCardioExercise in lib/exerciseOptions), so the Assault Bike (type "assault bike") qualifies. New nullable SetLog.gear column added by the boot-time guarded ALTER in docker_entrypoint.sh (additive, idempotent); plumbed through all 5 set-write paths, the summary/edit views, and CSV/JSON import-export. Existing rpe data is untouched and still displays. Program/AI target-RPE is unaffected.
This commit is contained in:
@@ -77,6 +77,11 @@ if command -v sqlite3 >/dev/null 2>&1 && [ -f "$DB_PATH" ]; then
|
||||
sqlite3 "$DB_PATH" "ALTER TABLE SetLog ADD COLUMN watts INTEGER;"
|
||||
fi
|
||||
|
||||
if ! sqlite3 "$DB_PATH" "PRAGMA table_info('SetLog');" 2>/dev/null | grep -q "|gear|"; then
|
||||
log "adding missing column SetLog.gear"
|
||||
sqlite3 "$DB_PATH" "ALTER TABLE SetLog ADD COLUMN gear INTEGER;"
|
||||
fi
|
||||
|
||||
if ! sqlite3 "$DB_PATH" "PRAGMA table_info('Workout');" 2>/dev/null | grep -q "|deletedAt|"; then
|
||||
log "adding missing column Workout.deletedAt"
|
||||
sqlite3 "$DB_PATH" "ALTER TABLE Workout ADD COLUMN deletedAt DATETIME;"
|
||||
|
||||
@@ -19,6 +19,7 @@ import { v_1_2_0_1 } from './v1.2.0.1'
|
||||
import { v_1_2_0_2 } from './v1.2.0.2'
|
||||
import { v_1_2_0_3 } from './v1.2.0.3'
|
||||
import { v_1_2_0_4 } from './v1.2.0.4'
|
||||
import { v_1_2_0_5 } from './v1.2.0.5'
|
||||
|
||||
/**
|
||||
* Version graph for the `proof-of-work` package.
|
||||
@@ -76,9 +77,12 @@ import { v_1_2_0_4 } from './v1.2.0.4'
|
||||
* column, added by the boot-time additive ALTER). Written through
|
||||
* every set path; legacy watts in customMetrics stays readable and
|
||||
* migrates on next save.
|
||||
* v1.2.0:5 — Gear (breathing, 1-5, Brian MacKenzie) replaces RPE as the effort
|
||||
* field for cardio exercises (type "cardio" or "cardio" muscle
|
||||
* group); strength keeps RPE. New SetLog.gear column via boot ALTER.
|
||||
*/
|
||||
export const versionGraph = VersionGraph.of({
|
||||
current: v_1_2_0_4,
|
||||
current: v_1_2_0_5,
|
||||
other: [
|
||||
v_1_0_0_1,
|
||||
v_1_0_0_2,
|
||||
@@ -99,5 +103,6 @@ export const versionGraph = VersionGraph.of({
|
||||
v_1_2_0_1,
|
||||
v_1_2_0_2,
|
||||
v_1_2_0_3,
|
||||
v_1_2_0_4,
|
||||
],
|
||||
})
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import { IMPOSSIBLE, VersionInfo } from '@start9labs/start-sdk'
|
||||
|
||||
/**
|
||||
* v1.2.0:5 — Gear (breathing, 1-5) replaces RPE as the cardio effort field (2026-06-16).
|
||||
*
|
||||
* Cardio exercises now log a breathing "Gear" (1-5, per Brian MacKenzie)
|
||||
* instead of RPE (6-10) as their effort field; non-cardio keeps RPE. An
|
||||
* exercise counts as cardio if its equipment type is "cardio" or it carries
|
||||
* the "cardio" muscle group (so Assault Bike, type "assault bike", qualifies).
|
||||
*
|
||||
* Additive schema change: the new nullable SetLog.gear column is added by the
|
||||
* boot-time guarded ALTER in docker_entrypoint.sh (migration stays empty, like
|
||||
* every other column add). Existing rpe data is untouched and still displays.
|
||||
*/
|
||||
export const v_1_2_0_5 = VersionInfo.of({
|
||||
version: '1.2.0:5',
|
||||
releaseNotes: {
|
||||
en_US:
|
||||
'Cardio exercises (assault bike, rower, ski erg, running, etc.) now log a breathing "Gear" (1-5) instead of RPE as their effort field. Strength exercises still use RPE. No data changes.',
|
||||
},
|
||||
migrations: {
|
||||
up: async () => {},
|
||||
down: IMPOSSIBLE,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user