diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 51de9ef..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - // Utilisez IntelliSense pour en savoir plus sur les attributs possibles. - // Pointez pour afficher la description des attributs existants. - // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Listen for Xdebug", - "type": "php", - "request": "launch", - "port": 9003 - }, - { - "name": "Launch currently open script", - "type": "php", - "request": "launch", - "program": "${file}", - "cwd": "${fileDirname}", - "port": 0, - "runtimeArgs": [ - "-dxdebug.start_with_request=yes" - ], - "env": { - "XDEBUG_MODE": "debug,develop", - "XDEBUG_CONFIG": "client_port=${port}" - } - }, - { - "name": "Launch Built-in web server", - "type": "php", - "request": "launch", - "runtimeArgs": [ - "-dxdebug.mode=debug", - "-dxdebug.start_with_request=yes", - "-S", - "localhost:0" - ], - "program": "", - "cwd": "${workspaceRoot}", - "port": 9003, - "serverReadyAction": { - "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started", - "uriFormat": "http://localhost:%s", - "action": "openExternally" - } - } - ] -} \ No newline at end of file diff --git a/model/Sport_track.db b/model/Sport_track.db index ce5daee..54e4826 100644 Binary files a/model/Sport_track.db and b/model/Sport_track.db differ diff --git a/sql/Sport_track.db.sql b/sql/Sport_track.db.sql new file mode 100644 index 0000000..e6346fd --- /dev/null +++ b/sql/Sport_track.db.sql @@ -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") +);