Added users to games in sample data

This commit is contained in:
Umbra Sheep
2018-09-30 19:55:31 +13:00
parent 294b3ff7d3
commit e0377fc548
3 changed files with 11 additions and 4 deletions
+5 -1
View File
@@ -63,13 +63,17 @@ BEGIN
DECLARE lastid VARCHAR(36) DEFAULT UUID();
INSERT INTO `polygonArea` (gameID, polygonID, userID, area) VALUES
(gID, lastid, usID, a);
SELECT * FROM `polygonArea` WHERE polygonID = lastid;
SELECT * FROM `polygonArea`
JOIN userJoinedGames ON
userJoinedGames.userID = polygonArea.userID AND userJoinedGames.gameID = polygonArea.gameID
WHERE polygonID = lastid;
END //
DELIMITER ;
INSERT INTO `gameInstances` (gameID) VALUES ("samdum");
INSERT INTO `users` (userID, nickname) VALUES ("samded", "Lesmaux");
INSERT INTO `users` (userID, nickname) VALUES ("fanded", "Umbra Sheep");
INSERT INTO `userJoinedGames` (userID, gameID, colour) VALUES ("samded", "samdum", "0000FF");
INSERT INTO `polygonArea` (gameID, polygonID, userID, area) VALUES
("samdum", "someuniqueid", "samded", 100000.1);
INSERT INTO `polygonPoints` (polygonID, lat, lng) VALUES