From 5b298444f01e33bcc32df4f55d66ab9f124884c6 Mon Sep 17 00:00:00 2001
From: Rhys Evans <EvansRM17@cardiff.ac.uk>
Date: Fri, 8 Dec 2023 13:27:30 +0000
Subject: [PATCH] created locations coordinates table

---
 src/main/resources/data.sql                   |  6 +++---
 src/main/resources/schema.sql                 | 19 ++++++++++++++++++-
 .../SmartTownsApplicationTests.java           | 10 +++++++---
 3 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql
index 8a101c70..02493238 100644
--- a/src/main/resources/data.sql
+++ b/src/main/resources/data.sql
@@ -52,6 +52,6 @@ insert into badgeprogress (userID, badgeID, progress) value ('1', '2', '70');
 insert into badgeprogress (userID, badgeID, progress) value ('2', '2', '70');
 
 delete from stickerprogress;
-insert into stickerprogress (userID, stickerID, hasSticker) value ('1', '1', true);
-insert into stickerprogress (userID, stickerID, hasSticker) value ('1', '3', true);
-insert into stickerprogress (userID, stickerID, hasSticker) value ('2', '2', true);
\ No newline at end of file
+# insert into stickerprogress (userID, stickerID, hasSticker) value ('1', '1', true);
+# insert into stickerprogress (userID, stickerID, hasSticker) value ('1', '3', true);
+# insert into stickerprogress (userID, stickerID, hasSticker) value ('2', '2', true);
\ No newline at end of file
diff --git a/src/main/resources/schema.sql b/src/main/resources/schema.sql
index bc971506..8a082ae0 100644
--- a/src/main/resources/schema.sql
+++ b/src/main/resources/schema.sql
@@ -59,4 +59,21 @@ create table if not exists stickerProgress
     userID bigint,
     stickerID bigint,
     hasSticker boolean /*Has sticker or not*/
-) engine=InnoDB;
\ No newline at end of file
+) engine=InnoDB;
+
+
+drop table if exists locations;
+
+
+
+drop table if exists locationsCoordinates;
+create table if not exists locationsCoordinates
+(locationCoordID bigint auto_increment primary key,
+ locationID bigint,
+ locationCoordName varchar(128),
+ locationCoordsLong double,
+ locationCoordsLat double,
+ Foreign Key (locationID) REFERENCES locations(locationID)
+
+
+)engine=InnoDB;
\ No newline at end of file
diff --git a/src/test/java/Team5/SmartTowns/SmartTownsApplicationTests.java b/src/test/java/Team5/SmartTowns/SmartTownsApplicationTests.java
index 7f58e107..3589f884 100644
--- a/src/test/java/Team5/SmartTowns/SmartTownsApplicationTests.java
+++ b/src/test/java/Team5/SmartTowns/SmartTownsApplicationTests.java
@@ -27,9 +27,13 @@ class SmartTownsApplicationTests {
 	void contextLoads() {
 	}
 
-	private static Location location;
-	private static locationRepositoryJDBC locationRepo;
-	private static JdbcTemplate jdbc;
+
+
+
+
+//	private static Location location;
+//	private static locationRepositoryJDBC locationRepo;
+//	private static JdbcTemplate jdbc;
 //	@BeforeAll
 //	public static void before() {
 //		location = new Location();
-- 
GitLab