fix: added optional user_id to exercises table
This commit is contained in:
@@ -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 [
|
||||||
|
|||||||
Reference in New Issue
Block a user