Skip to content

Commit

Permalink
V.1.0.1 - Sans .vscode + fichier sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaël Besily committed Oct 4, 2022
1 parent 38312a1 commit ba0f0e3
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 48 deletions.
48 changes: 0 additions & 48 deletions .vscode/launch.json

This file was deleted.

Binary file modified model/Sport_track.db
Binary file not shown.
38 changes: 38 additions & 0 deletions sql/Sport_track.db.sql
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")
);

0 comments on commit ba0f0e3

Please sign in to comment.