-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V.1.0.1 - Sans .vscode + fichier sql
- Loading branch information
Michaël Besily
committed
Oct 4, 2022
1 parent
38312a1
commit ba0f0e3
Showing
3 changed files
with
38 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
BEGIN TRANSACTION; | ||
CREATE TABLE "User" ( | ||
"idUser" INTEGER, | ||
"lName" TEXT NOT NULL, | ||
"fName" TEXT NOT NULL, | ||
"birthDate" TEXT NOT NULL, | ||
"gender" TEXT NOT NULL CHECK("gender" = 'F' OR "gender" = 'M' OR "gender" = 'NB'), | ||
"size" REAL NOT NULL, | ||
"weight" REAL NOT NULL, | ||
"email" TEXT NOT NULL | ||
CONSTRAINT "uq_email" UNIQUE, | ||
"password" TEXT NOT NULL, | ||
CONSTRAINT "pk_User" PRIMARY KEY("idUser" AUTOINCREMENT) | ||
); | ||
CREATE TABLE IF NOT EXISTS "Data" ( | ||
"idData" INTEGER, | ||
"startTime" TEXT, | ||
"longitude" REAL, | ||
"latitude" REAL, | ||
"altitude" INTEGER, | ||
"idAct" INTEGER NOT NULL, | ||
CONSTRAINT "pk_Data" PRIMARY KEY("idData"), | ||
CONSTRAINT "fk_Data_Activities" FOREIGN KEY("idAct") REFERENCES "Activities"("idAct") | ||
); | ||
CREATE TABLE IF NOT EXISTS "Activities" ( | ||
"idAct" INTEGER, | ||
"description" TEXT NOT NULL, | ||
"date" DATE NOT NULL, | ||
"startTime" TEXT, | ||
"duration" TEXT, | ||
"distance" INTEGER, | ||
"cardiacFreqMin" INTEGER, | ||
"cardiacFreqAvg" INTEGER, | ||
"cardiacFreqMax" TEXT, | ||
"idUser" TEXT, | ||
CONSTRAINT "pk_Activities" PRIMARY KEY("idAct" AUTOINCREMENT), | ||
CONSTRAINT "fk_Activites_User" FOREIGN KEY("idUser") REFERENCES "User"("idUser") | ||
); |