]> git.rm.cloudns.org Git - xonotic/xonstatdb.git/commitdiff
Add groups table for admin functionality.
authorAnt Zucaro <azucaro@gmail.com>
Mon, 16 Jun 2014 01:05:07 +0000 (21:05 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Mon, 16 Jun 2014 01:05:07 +0000 (21:05 -0400)
build/build_full.sql
tables/player_groups.tab [new file with mode: 0644]

index 6e2bba57ec64f6541c8a5a4a076b893ee91f4be9..fe6082748068436ddb25726798e252a7332cde2c 100755 (executable)
@@ -1,4 +1,5 @@
 -- drop tables first in reverse order
+drop table if exists player_groups;
 drop table if exists player_game_anticheats;
 drop table if exists team_game_stats;
 drop table if exists summary_stats cascade;
@@ -51,6 +52,7 @@ drop table if exists players cascade;
 \i tables/summary_stats.tab
 \i tables/team_game_stats.tab
 \i tables/player_game_anticheats.tab
+\i tables/player_groups.tab
 
 begin;
 
diff --git a/tables/player_groups.tab b/tables/player_groups.tab
new file mode 100644 (file)
index 0000000..d401f39
--- /dev/null
@@ -0,0 +1,14 @@
+CREATE TABLE xonstat.player_groups
+(
+  player_id integer NOT NULL,
+  group_name character varying(30) NOT NULL,
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
+  CONSTRAINT player_groups_pk PRIMARY KEY (player_id, group_name),
+  CONSTRAINT player_groups_fk001 FOREIGN KEY (player_id)
+      REFERENCES xonstat.players (player_id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+  OIDS=FALSE
+);
+ALTER TABLE xonstat.player_groups OWNER TO xonstat;