add boatdamages functionality

This commit is contained in:
2023-08-02 14:29:19 +02:00
parent f7e623b8c3
commit ff31ad83fe
11 changed files with 419 additions and 16 deletions

View File

@ -5,6 +5,7 @@ CREATE TABLE IF NOT EXISTS "user" (
"is_cox" boolean NOT NULL DEFAULT FALSE,
"is_admin" boolean NOT NULL DEFAULT FALSE,
"is_guest" boolean NOT NULL DEFAULT TRUE,
"is_tech" boolean NOT NULL DEFAULT FALSE,
"deleted" boolean NOT NULL DEFAULT FALSE,
"last_access" DATETIME
);
@ -112,11 +113,11 @@ CREATE TABLE IF NOT EXISTS "boat_damage" (
"boat_id" INTEGER NOT NULL REFERENCES boat(id),
"desc" text not null,
"user_id_created" INTEGER NOT NULL REFERENCES user(id),
"created_at" text not null default CURRENT_TIMESTAMP,
"created_at" datetime not null default CURRENT_TIMESTAMP,
"user_id_fixed" INTEGER REFERENCES user(id), -- none: not fixed yet
"fixed_at" text,
"fixed_at" datetime,
"user_id_verified" INTEGER REFERENCES user(id),
"verified_at" text,
"verified_at" datetime,
"lock_boat" boolean not null default false -- if true: noone can use the boat
);