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 <noreply@anthropic.com>
This commit is contained in:
parent
d15ec056b4
commit
7758bbf12e
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user