Skip to content
Snippets Groups Projects
Commit ca04f626 authored by Rhys Nute's avatar Rhys Nute
Browse files

foreign keys

parent 68051fc4
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,8 @@ drop table if exists trails;
create table if not exists trails
(
trailID bigint auto_increment primary key,
name varchar(128)
name varchar(128),
FOREIGN KEY (trailID) REFERENCES locations(trailID)
) engine=InnoDB;
drop table if exists locations;
......@@ -14,7 +15,8 @@ create table if not exists locations
locationEmail varchar(128),
locationDescription longtext,
locationPlace varchar(255),
locationTrailID varchar(128)
locationTrailID varchar(128),
trailID bigint
) engine=InnoDB;
drop table if exists users;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment