You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATETABLEusers (id SERIALPRIMARY KEY, name VARCHAR(25), password VARCHAR(26), email VARCHAR(255), permission_id INT, created_at TIMESTAMP WITH TIME ZONENOT NULL DEFAULT clock_timestamp(), modifed_at TIMESTAMP WITH TIME ZONENOT NULL DEFAULT clock_timestamp());
Permission
CREATETABLEpermissions (id SERIALPRIMARY KEY, user_id INTEGERNOT NULL, permission INTEGERNOT NULL, checkpoint_id INTEGER, created_at TIMESTAMP WITH TIME ZONENOT NULL DEFAULT clock_timestamp(), modifed_at TIMESTAMP WITH TIME ZONENOT NULL DEFAULT clock_timestamp());
Checkpoint
CREATETABLEcheckpoints (id SERIALPRIMARY KEY, name VARCHAR(50), description VARCHAR(1000), canBeVisible booleanNOT NULL, location_id INTEGER, created_at TIMESTAMP WITH TIME ZONENOT NULL DEFAULT clock_timestamp(), modifed_at TIMESTAMP WITH TIME ZONENOT NULL DEFAULT clock_timestamp());
Point
CREATETABLEpoints (id SERIALPRIMARY KEY, checkpoint_id INTEGERNOT NULL, team_id INTEGERNOT NULL, point_amount INTEGERNOT NULL, created_at TIMESTAMP WITH TIME ZONENOT NULL DEFAULT clock_timestamp(), modifed_at TIMESTAMP WITH TIME ZONENOT NULL DEFAULT clock_timestamp());
Team
CREATETABLEteams (id SERIALPRIMARY KEY, name VARCHAR(100) NOT NULL, created_at TIMESTAMP WITH TIME ZONENOT NULL DEFAULT clock_timestamp(), modifed_at TIMESTAMP WITH TIME ZONENOT NULL DEFAULT clock_timestamp());
Possible future developments
location: id, locationData, checkpoint_id, created, modifed (Possible improvement with PostGIS)