fix: add missing meas_id column to photos table
All checks were successful
Deploy Development / deploy (push) Successful in 55s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 12s

SQLite schema (v9a) has meas_id in photos table, but PostgreSQL
schema (v9b) was missing it. This caused migration to fail.

Added meas_id as nullable UUID column for backward compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lars 2026-03-18 12:23:13 +01:00
parent d15ec056b4
commit 7758bbf12e

View File

@ -177,6 +177,7 @@ CREATE INDEX IF NOT EXISTS idx_activity_profile_date ON activity_log(profile_id,
CREATE TABLE IF NOT EXISTS photos ( CREATE TABLE IF NOT EXISTS photos (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
profile_id UUID NOT NULL REFERENCES profiles(id) ON DELETE CASCADE, profile_id UUID NOT NULL REFERENCES profiles(id) ON DELETE CASCADE,
meas_id UUID, -- Legacy: reference to measurement (circumference/caliper)
date DATE, date DATE,
path TEXT NOT NULL, path TEXT NOT NULL,
created TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP created TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP