mirror of
https://github.com/amineo/t2-stat-parser.git
synced 2026-02-18 22:03:36 +00:00
Update to ingest/display new stats format; QoL updates soon...
This commit is contained in:
parent
bb179b82f8
commit
0b5aceca7a
9 changed files with 497 additions and 440 deletions
|
|
@ -31,27 +31,54 @@ CREATE TABLE "public"."players" (
|
|||
);
|
||||
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS "public"."games";
|
||||
CREATE SEQUENCE IF NOT EXISTS games_id_seq;
|
||||
|
||||
-- Table Definition
|
||||
CREATE TABLE "public"."games" (
|
||||
"game_id" numeric NOT NULL UNIQUE,
|
||||
"map" text NOT NULL,
|
||||
"datestamp" timestamp NOT NULL,
|
||||
"gametype" text NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
CONSTRAINT game_pk PRIMARY KEY (game_id)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS "public"."game_detail";
|
||||
CREATE SEQUENCE IF NOT EXISTS games_id_seq;
|
||||
|
||||
-- Table Definition
|
||||
CREATE TABLE "public"."game_detail" (
|
||||
"id" int4 NOT NULL DEFAULT nextval('games_id_seq'::regclass),
|
||||
"player_guid" numeric NOT NULL,
|
||||
"player_name" text NOT NULL,
|
||||
"stat_overwrite" numeric NOT NULL,
|
||||
"map" text NOT NULL,
|
||||
"game_id" numeric NOT NULL DEFAULT 0,
|
||||
"game_id" numeric NOT NULL,
|
||||
"stats" jsonb NOT NULL,
|
||||
"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 (game_id) REFERENCES games (game_id),
|
||||
FOREIGN KEY (player_guid) REFERENCES players (player_guid)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION trigger_set_timestamp()
|
||||
RETURNS TRIGGER AS $$
|
||||
BEGIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue