From 7758bbf12ef4bb605d0ca34377c2ff240eb12933 Mon Sep 17 00:00:00 2001 From: Lars Date: Wed, 18 Mar 2026 12:23:13 +0100 Subject: [PATCH] fix: add missing meas_id column to photos table 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 --- backend/schema.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/schema.sql b/backend/schema.sql index 58139d4..a921b78 100644 --- a/backend/schema.sql +++ b/backend/schema.sql @@ -177,6 +177,7 @@ CREATE INDEX IF NOT EXISTS idx_activity_profile_date ON activity_log(profile_id, CREATE TABLE IF NOT EXISTS photos ( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), profile_id UUID NOT NULL REFERENCES profiles(id) ON DELETE CASCADE, + meas_id UUID, -- Legacy: reference to measurement (circumference/caliper) date DATE, path TEXT NOT NULL, created TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP