resetting repository

This commit is contained in:
SamR1
2017-12-09 19:16:35 +01:00
parent 5a5ea20d09
commit 40e7d35cb9
154 changed files with 0 additions and 83426 deletions

View File

@ -1,59 +0,0 @@
CREATE DATABASE IF NOT EXISTS mpwo CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE mpwo;
CREATE TABLE users (
id int(4) UNSIGNED NOT NULL AUTO_INCREMENT,
username varchar(20) NOT NULL,
pwd varchar(64) NOT NULL,
first_name varchar(50) NOT NULL,
last_name varchar(50) NOT NULL,
birthday date,
photo BLOB,
PRIMARY KEY (id)
) ENGINE=InnoDB;
CREATE TABLE sports (
id int(4) UNSIGNED NOT NULL AUTO_INCREMENT,
label varchar(50) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB;
CREATE TABLE gpx (
id int(4) UNSIGNED NOT NULL AUTO_INCREMENT,
file BLOB NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB;
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) UNSIGNED,
activity_date datetime NOT NULL,
duration int(4) NOT NULL,
pauses int(4),
distance int(4),
min_alt int(4),
max_alt int(4),
descent int(4),
ascent int(4),
max_speed int(4),
ave_speed int(4),
PRIMARY KEY (id),
FOREIGN KEY (user_id)
REFERENCES users(id),
FOREIGN KEY (sport_id)
REFERENCES sports(id),
FOREIGN KEY (gpx_id)
REFERENCES gpx(id)
) ENGINE=InnoDB;
CREATE TABLE personalRecords (
id int(4) UNSIGNED NOT NULL AUTO_INCREMENT,
activity_id int(4) UNSIGNED NOT NULL,
record_type varchar(50) NOT NULL,
value int(4),
PRIMARY KEY (id),
FOREIGN KEY (activity_id)
REFERENCES activities(id)
) ENGINE=InnoDB;

View File

@ -1,3 +0,0 @@
CREATE USER 'mpwo'@'localhost' IDENTIFIED BY 'mpwo';
GRANT ALL PRIVILEGES ON `mpwo` . * TO 'mpwo'@'localhost';
FLUSH PRIVILEGES;