database: script updated

This commit is contained in:
Sam 2017-08-27 09:46:55 +02:00
parent c610217f02
commit 5a5ea20d09

View File

@ -28,7 +28,7 @@ CREATE TABLE activities (
id int(4) UNSIGNED NOT NULL AUTO_INCREMENT, id int(4) UNSIGNED NOT NULL AUTO_INCREMENT,
user_id int(4) UNSIGNED NOT NULL, user_id int(4) UNSIGNED NOT NULL,
sport_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, activity_date datetime NOT NULL,
duration int(4) NOT NULL, duration int(4) NOT NULL,
pauses int(4), pauses int(4),
@ -43,7 +43,9 @@ PRIMARY KEY (id),
FOREIGN KEY (user_id) FOREIGN KEY (user_id)
REFERENCES users(id), REFERENCES users(id),
FOREIGN KEY (sport_id) FOREIGN KEY (sport_id)
REFERENCES sports(id) REFERENCES sports(id),
FOREIGN KEY (gpx_id)
REFERENCES gpx(id)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
CREATE TABLE personalRecords ( CREATE TABLE personalRecords (