Update table schema for all gametypes

This commit is contained in:
Anthony Mineo 2020-03-07 13:43:46 -05:00
parent 869c1cf065
commit 0417f4d509

View file

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