Files
fitness/backend/migrations/002_workout_idempotency.sql
T

8 lines
381 B
SQL

-- Preserve offline workout identity across network retries.
-- Apply once to an existing database created from the original schema.sql.
-- Fresh databases created from the updated schema.sql already contain this column.
ALTER TABLE workouts
ADD COLUMN client_workout_uuid CHAR(36) NULL AFTER user_id,
ADD UNIQUE KEY uq_user_client_workout (user_id, client_workout_uuid);