added profile_game table

This commit is contained in:
Andrei Stoica 2024-01-26 21:39:33 -05:00
parent ed0d8d2389
commit ce845eb0b2
4 changed files with 49 additions and 0 deletions

View File

@ -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;

View File

@ -0,0 +1,7 @@
-- Revert leetify-data:profile-game from pg
BEGIN;
DROP TABLE data.profile_game;
COMMIT;

View File

@ -4,3 +4,4 @@
data-schema 2024-01-25T03:19:31Z andrei <andrei@tower> # adding schema for data data-schema 2024-01-25T03:19:31Z andrei <andrei@tower> # adding schema for data
profile-meta [data-schema] 2024-01-25T03:28:08Z andrei <andrei@tower> # add table for profile metadata profile-meta [data-schema] 2024-01-25T03:28:08Z andrei <andrei@tower> # add table for profile metadata
player-stats 2024-01-26T23:39:00Z andrei <andrei@tower> # Add player-stats table player-stats 2024-01-26T23:39:00Z andrei <andrei@tower> # Add player-stats table
profile-game [data-schema] 2024-01-27T02:15:46Z andrei <andrei@tower> # add profile_game table

View File

@ -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;