From 0417f4d5099587c764cec7461d6779baf9905915 Mon Sep 17 00:00:00 2001 From: Anthony Mineo Date: Sat, 7 Mar 2020 13:43:46 -0500 Subject: [PATCH] Update table schema for all gametypes --- .../docker-entrypoint-initdb.d/backup/t2_stats.sql | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build/postgres/docker-entrypoint-initdb.d/backup/t2_stats.sql b/build/postgres/docker-entrypoint-initdb.d/backup/t2_stats.sql index b196239..a372c42 100644 --- a/build/postgres/docker-entrypoint-initdb.d/backup/t2_stats.sql +++ b/build/postgres/docker-entrypoint-initdb.d/backup/t2_stats.sql @@ -16,8 +16,14 @@ CREATE TABLE "public"."players" ( "id" int4 NOT NULL DEFAULT nextval('player_id_seq'::regclass), "player_guid" numeric NOT NULL UNIQUE, "player_name" text NOT NULL UNIQUE, - "total_games" numeric NOT NULL DEFAULT 0, - "stat_overwrite" numeric NOT NULL DEFAULT 1, + "total_games_ctfgame" numeric NOT NULL DEFAULT 0, + "total_games_dmgame" numeric NOT NULL DEFAULT 0, + "total_games_lakrabbitgame" numeric NOT NULL DEFAULT 0, + "total_games_sctfgame" numeric NOT NULL DEFAULT 0, + "stat_overwrite_ctfgame" numeric NOT NULL DEFAULT 0, + "stat_overwrite_dmgame" numeric NOT NULL DEFAULT 0, + "stat_overwrite_lakrabbitgame" numeric NOT NULL DEFAULT 0, + "stat_overwrite_sctfgame" numeric NOT NULL DEFAULT 0, "uuid" text NOT NULL UNIQUE, created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), @@ -39,6 +45,7 @@ CREATE TABLE "public"."games" ( "datestamp" timestamp NOT NULL, "uuid" text NOT NULL UNIQUE, "gametype" text NOT NULL, + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), CONSTRAINT games_pk PRIMARY KEY (id), FOREIGN KEY (player_guid) REFERENCES players (player_guid) );