Added Database information

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2020-11-26 23:06:14 +01:00
parent 90f817283d
commit 7af226f08f
3 changed files with 25 additions and 1 deletions

BIN
DatabaseSchema.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

24
DatabaseSetup.sql Normal file
View File

@ -0,0 +1,24 @@
DROP TABLE students, events;
CREATE TABLE IF NOT EXISTS students
(
id int GENERATED ALWAYS AS IDENTITY,
snowflake text NOT NULL,
ade_resource int NOT NULL,
PRIMARY KEY (id),
UNIQUE (snowflake)
);
CREATE TABLE IF NOT EXISTS events
(
id int GENERATED ALWAYS AS IDENTITY,
students_id int NOT NULL,
summary text NOT NULL,
start_event timestamptz NOT NULL,
end_event timestamptz NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (students_id)
REFERENCES students (id)
ON DELETE CASCADE
);

View File

@ -7,5 +7,5 @@
* in the user manual at https://docs.gradle.org/6.7/userguide/multi_project_builds.html
*/
rootProject.name = 'reminderbot'
rootProject.name = 'presenceirb'
include('app')