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,
  },
})
