diff --git a/Docs/DB/schema.db b/Docs/DB/schema.db index e2c3e12..729afc8 100644 --- a/Docs/DB/schema.db +++ b/Docs/DB/schema.db @@ -1,30 +1,36 @@ https://dbdiagram.io/d/ -Table "user" { - "id" INT(10) [pk] - "name" VARCHAR(20) - "forename" VARCHAR(20) - "password" VARCHAR(20) - "token" VARCHAR(20) - "is_admin" BIT -} - Table "event" { - "id" INT(10) [pk] - "name" VARCHAR(20) - "priority" TINYINT(2) - "is_full_day" BIT - "start" TIME - "end" TIME + "id" bigint(20) [pk, not null, increment] + "name" varchar(255) [default: NULL] + "start" time [default: NULL] + "end" time [default: NULL] + "is_full_day" bit(1) [not null] + "is_private" bit(1) [not null] + "priority" int(11) [default: NULL] } -Table "event_list" { - "id" INT(10) [pk] - "user_id" NT(10) - "event_id" NT(10) - "date" date +Table "user" { + "id" bigint(20) [pk, not null, increment] + "forename" varchar(255) [default: NULL] + "name" varchar(255) [default: NULL] + "is_admin" bit(1) [not null] + "password" varchar(255) [default: NULL] + "token" varchar(255) [default: NULL] } -Ref:"event_list"."user_id" < "user"."id" -Ref:"event_list"."event_id" < "event"."id" \ No newline at end of file +Table "user_event" { + "date" date [not null, default: `curdate()`] + "event_id" bigint(20) [not null] + "user_id" bigint(20) [not null] + +Indexes { + event_id [name: "FKspe8srtv69gubpphvrnd7wekt"] + user_id [name: "FKk3smcqwou8absq8qjt3wk4vy9"] + (date, event_id, user_id) [pk] +} +} + +Ref:"event"."id" < "user_event"."event_id" +Ref:"user"."id" < "user_event"."user_id" \ No newline at end of file diff --git a/Docs/DB/schema.png b/Docs/DB/schema.png index bd05eff..a2b36c0 100644 Binary files a/Docs/DB/schema.png and b/Docs/DB/schema.png differ