fix: added optional user_id to exercises table

This commit is contained in:
2026-08-29 15:13:28 +02:00
parent d0de5b2982
commit 7f98fedaa6
@@ -1,6 +1,7 @@
CREATE TABLE exercises ( CREATE TABLE exercises (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(), id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL, name TEXT NOT NULL,
user_id UUID REFERENCES users(id) ON DELETE CASCADE,
equipment TEXT[] NOT NULL DEFAULT '{}' equipment TEXT[] NOT NULL DEFAULT '{}'
CHECK ( CHECK (
equipment <@ ARRAY [ equipment <@ ARRAY [