diff --git a/sqitch/deploy/profile-game.sql b/sqitch/deploy/profile-game.sql new file mode 100644 index 0000000..712a651 --- /dev/null +++ b/sqitch/deploy/profile-game.sql @@ -0,0 +1,28 @@ +-- Deploy leetify-data:profile-game to pg +-- requires: data-schema + +BEGIN; + + CREATE TABLE IF NOT EXISTS data.profile_game ( + leetifyUserId TEXT, + ctLeetifyRating NUMERIC, + ctLeetifyRatingRounds NUMERIC, + dataSource NUMERIC, + elo NUMERIC, + gameFinishedAt TIMESTAMP, + gameId TEXT, + isCs2 BOOL, + mapName TEXT, + matchResult TEXT, + scores TEXT, -- has to be extracted from array + skillLevel NUMERIC, + tLeetifyRating NUMERIC, + tLeetifyRatingRounds NUMERIC, + deaths NUMERIC, + hasBannedPlayer BOOL, + kills NUMERIC, + partySize NUMERIC + ); + + +COMMIT; diff --git a/sqitch/revert/profile-game.sql b/sqitch/revert/profile-game.sql new file mode 100644 index 0000000..2a8d255 --- /dev/null +++ b/sqitch/revert/profile-game.sql @@ -0,0 +1,7 @@ +-- Revert leetify-data:profile-game from pg + +BEGIN; + + DROP TABLE data.profile_game; + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 8424d0e..711f131 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -4,3 +4,4 @@ data-schema 2024-01-25T03:19:31Z andrei # adding schema for data profile-meta [data-schema] 2024-01-25T03:28:08Z andrei # add table for profile metadata player-stats 2024-01-26T23:39:00Z andrei # Add player-stats table +profile-game [data-schema] 2024-01-27T02:15:46Z andrei # add profile_game table diff --git a/sqitch/verify/profile-game.sql b/sqitch/verify/profile-game.sql new file mode 100644 index 0000000..cfc4f29 --- /dev/null +++ b/sqitch/verify/profile-game.sql @@ -0,0 +1,13 @@ +-- Verify leetify-data:profile-game on pg + +BEGIN; + +-- XXX Add verifications here. +SELECT leetifyUserId, ctLeetifyRating, ctLeetifyRatingRounds, dataSource, elo, + gameFinishedAt, gameId, isCs2, mapName, matchResult, scores, skillLevel, + tLeetifyRating, tLeetifyRatingRounds, deaths, hasBannedPlayer, + kills, partySize +FROM data.profile_game +WHERE FALSE; + +ROLLBACK;