Skip to content

Commit

Permalink
Compatibility for new foreign key constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Jul 5, 2020
1 parent 3321f1c commit 81295e6
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 15 deletions.
10 changes: 8 additions & 2 deletions src/inttest/resources/sql/cleanGameData.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
DELETE FROM game_stats;
DELETE FROM game_featuredMods;
DELETE
FROM matchmaker_queue_map_pool;
DELETE
FROM matchmaker_queue;
DELETE
FROM game_stats;
DELETE
FROM game_featuredMods;
14 changes: 12 additions & 2 deletions src/inttest/resources/sql/cleanMapVersion.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
DELETE FROM map_version;
DELETE FROM map;
DELETE
FROM map_version_reviews_summary;
DELETE
FROM map_version_review;
DELETE
FROM map_reviews_summary;
DELETE
FROM map_pool_map_version;
DELETE
FROM map_version;
DELETE
FROM map;
24 changes: 16 additions & 8 deletions src/inttest/resources/sql/prepGameData.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
DELETE FROM game_stats;
DELETE FROM game_featuredMods;
DELETE
FROM matchmaker_queue_map_pool;
DELETE
FROM matchmaker_queue;
DELETE
FROM game_stats;
DELETE
FROM game_featuredMods;

INSERT INTO game_featuredMods (id, gamemod, name, description, publish, git_url, git_branch, file_extension, allow_override)
VALUES
(1, 'faf', 'FAF', 'Forged Alliance Forever', 1, 'https://github.com/FAForever/fa.git', 'deploy/faf', 'nx2', FALSE),
(6, 'ladder1v1', 'FAF', 'Ladder games', 1, 'https://github.com/FAForever/fa.git', 'deploy/faf', 'nx2', TRUE),
(25, 'coop', 'Coop', 'Multiplayer campaign games', 1, 'https://github.com/FAForever/fa-coop.git', 'master', 'cop',
TRUE);
INSERT INTO game_featuredMods (id, gamemod, name, description, publish, git_url, git_branch, file_extension,
allow_override)
VALUES (1, 'faf', 'FAF', 'Forged Alliance Forever', 1, 'https://github.com/FAForever/fa.git', 'deploy/faf', 'nx2',
FALSE),
(6, 'ladder1v1', 'FAF', 'Ladder games', 1, 'https://github.com/FAForever/fa.git', 'deploy/faf', 'nx2', TRUE),
(25, 'coop', 'Coop', 'Multiplayer campaign games', 1, 'https://github.com/FAForever/fa-coop.git', 'master',
'cop',
TRUE);

INSERT INTO game_stats (id, startTime, gameName, gameType, gameMod, `host`, mapId, validity) VALUES
(1, NOW(), 'Test game', '0', 6, 1, 1, 0);
17 changes: 14 additions & 3 deletions src/inttest/resources/sql/prepMapVersion.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
DELETE FROM map_version;
DELETE FROM map;
DELETE
FROM map_version_reviews_summary;
DELETE
FROM map_version_review;
DELETE
FROM map_reviews_summary;
DELETE
FROM map_pool_map_version;
DELETE
FROM map_version;
DELETE
FROM map;

INSERT INTO map (id, display_name, map_type, battle_type, author) VALUES (1, 'display name', 'mtype', 'btype', 1);
INSERT INTO map (id, display_name, map_type, battle_type, author)
VALUES (1, 'display name', 'mtype', 'btype', 1);
INSERT INTO map_version (id, description, max_players, width, height, version, filename, map_id, hidden, ranked)
VALUES (1, 'des', 2, 2, 2, 1, 'map/ghb.zip', 1, 0, 1);

0 comments on commit 81295e6

Please sign in to comment.