From 39d676e5c8a5d4f37551e98babaec326b1da6378 Mon Sep 17 00:00:00 2001 From: Lars Date: Sun, 22 Mar 2026 08:22:58 +0100 Subject: [PATCH] fix: migration 009 - change profile_id from VARCHAR(36) to UUID Profile IDs are UUID type in the profiles table, not VARCHAR. This was causing foreign key constraint error on migration. Co-Authored-By: Claude Opus 4.6 --- backend/migrations/009_sleep_log.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/migrations/009_sleep_log.sql b/backend/migrations/009_sleep_log.sql index 3c77247..9f4edeb 100644 --- a/backend/migrations/009_sleep_log.sql +++ b/backend/migrations/009_sleep_log.sql @@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS sleep_log ( id SERIAL PRIMARY KEY, - profile_id VARCHAR(36) NOT NULL REFERENCES profiles(id) ON DELETE CASCADE, + profile_id UUID NOT NULL REFERENCES profiles(id) ON DELETE CASCADE, date DATE NOT NULL, bedtime TIME, wake_time TIME,