From 5a5ea20d092d38f6acb5cfa63f5535868dd5faf2 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 27 Aug 2017 09:46:55 +0200 Subject: [PATCH] database: script updated --- docs/db/mpwo.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/db/mpwo.sql b/docs/db/mpwo.sql index aa4e4957..a31ae5ff 100644 --- a/docs/db/mpwo.sql +++ b/docs/db/mpwo.sql @@ -28,7 +28,7 @@ CREATE TABLE activities ( id int(4) UNSIGNED NOT NULL AUTO_INCREMENT, user_id int(4) UNSIGNED NOT NULL, sport_id int(4) UNSIGNED NOT NULL, -gpx_id int(4), +gpx_id int(4) UNSIGNED, activity_date datetime NOT NULL, duration int(4) NOT NULL, pauses int(4), @@ -43,7 +43,9 @@ PRIMARY KEY (id), FOREIGN KEY (user_id) REFERENCES users(id), FOREIGN KEY (sport_id) - REFERENCES sports(id) + REFERENCES sports(id), +FOREIGN KEY (gpx_id) + REFERENCES gpx(id) ) ENGINE=InnoDB; CREATE TABLE personalRecords (