added profile_game table
This commit is contained in:
parent
ed0d8d2389
commit
ce845eb0b2
|
|
@ -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;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- Revert leetify-data:profile-game from pg
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
DROP TABLE data.profile_game;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
Loading…
Reference in New Issue