Allow to add real guests

This commit is contained in:
2023-08-09 20:30:37 +00:00
parent 723ada09b0
commit 590b41aa33
8 changed files with 308 additions and 91 deletions

View File

@ -48,10 +48,10 @@ CREATE TABLE IF NOT EXISTS "trip" (
);
CREATE TABLE IF NOT EXISTS "user_trip" (
"user_id" INTEGER NOT NULL REFERENCES user(id),
"user_id" INTEGER REFERENCES user(id),
"user_note" text, -- only shown if user_id = none
"trip_details_id" INTEGER NOT NULL REFERENCES trip_details(id),
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT unq UNIQUE (user_id, trip_details_id) -- allow user to participate only once for each trip
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS "log" (