Skip to content

Commit

Permalink
Setup DB with authorized stats provider, bot players, and test player
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Nov 10, 2023
1 parent 654b6ef commit a8d111b
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 0 deletions.
142 changes: 142 additions & 0 deletions config/db/setup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
-- --------------------------------------------------------
-- Setup the DB the first time in development
-- --------------------------------------------------------

-- Authorize the defalt stats provider
UPDATE stats_provider SET authorized = 1 WHERE id = 1;
SELECT * FROM stats_provider;

UPDATE stats_provider_auth_ip SET address = '0.0.0.0/0' ;
SELECT * FROM stats_provider_auth_ip;

-- Authorize bot players
INSERT INTO player (name, password, email, country, rank_id) values ('T. Karlsson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('R. Edgren', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('P.K. Johansson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Jonsson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('S. Wallberg', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('A. Andersson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('H. Karlsson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('K. Bergqvist', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Hornlund', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('R. Lopez', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. Gothberg', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('P. Hoyles', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Kopparhed', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('C. Cyreus', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('T. Dahl', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Bagge', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('T. Laedre', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('L. Martensson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. Mod', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Eriksson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. Sundberg', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('N. Goksu', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('N. Fegraeus', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('F. Lindblom', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Stenkvist', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Lord', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('L. Fujita', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('E. Sjovold', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('T. Holmsten', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Ostman', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('T. Soderman', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. Wiksten', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Sanick', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Salt', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Doran', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('S. Lindgren', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Sjoberg', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. Votypka', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('B. Pajor', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Andersson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('P. Lindholm', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('P. OShaughnessy', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('N. Stromquist', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('S. Strandberg', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Fritze', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Norberg', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('B. Hedberg', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('O. Carlen', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('K. Hegethorn', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. Sirland', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Dawsari', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('L. Gustavsson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('C. Bergqvist', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Kjellstrom', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('P. Soderlund', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('H. Andersson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Gonzales', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Crabtree', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('C. Tou', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('G. Pigula', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Le', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('R. Pace', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('K. Lee', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('R. Walton', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. King', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('F. Morales', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('L. Castillo', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Persson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('U. Rask', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Dohl', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Kylmamaa', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('S. Parkinson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Newton', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('A. Papasavas', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('L. Josephson', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('S. Decker', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Rudberg', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Hedlund', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('C. Grass', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Aberg', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('R. Smedberg', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('P. Osterblom', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('S. Evans', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('S. Abdey', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. Aberin', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Belanger', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Biro', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Brassard', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Ceron', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Choy', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('R. Davey', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('E. Douridas', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('C. Elliott', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Evans', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('R. Gimbel', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('R. Hallwood', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Hart', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('K. Hoang', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. Kerr', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('F. Liliegren', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('R. Linde', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Livesey', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('R. Love', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('A. Marini', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('S. North', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('S. Pinkerton', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Price', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. Rickard', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Ross', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('E. Smith', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('N. White', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('K. Yip', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('W. Young', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('D. Yee', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Vifian', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('B. Smith', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('L. Brown', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('S. Flyte', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('C. Barnett', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('M. Cassidy', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('T. Kingston', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('I. Ackworth', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. VanRooyen', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Hartling', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('J. Hargelid', '', '[email protected]', 'US', 0);
INSERT INTO player (name, password, email, country, rank_id) values ('C. Clarke', '', '[email protected]', 'US', 0);

-- Authorize a 'test' player of id '100000001'. The ID '100000001' is the ID of the first player to register with the master server (PRMasterServer)
INSERT INTO player (id, name, password, email, country, rank_id) values (100000001, 'test', '098f6bcd4621d373cade4e832627b4f6', '[email protected]', 'US', 0);
SELECT id, name, password, email, country, rank_id FROM player;
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ services:
volumes:
- ./src/ASP/system/sql/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro # Seed the DB the first time
- ./src/ASP/system/sql/data.sql:/docker-entrypoint-initdb.d/02-data.sql:ro # Seed the DB the first time
- ./config/db/setup.sql:/docker-entrypoint-initdb.d/03-setup.sql:ro # Setup the DB the first time
- ./config/db/my.cnf:/etc/my.cnf:ro
- db-volume:/var/lib/mysql
networks:
Expand Down
1 change: 1 addition & 0 deletions docs/full-bf2-stack-example/docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ services:
volumes:
- ../../src/ASP/system/sql/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro # Seed the DB the first time
- ../../src/ASP/system/sql/data.sql:/docker-entrypoint-initdb.d/02-data.sql:ro # Seed the DB the first time
- ../../config/db/setup.sql:/docker-entrypoint-initdb.d/03-setup.sql:ro # Setup the DB the first time

0 comments on commit a8d111b

Please sign in to comment.