From: antzucaro Date: Mon, 10 Oct 2011 19:13:35 +0000 (-0400) Subject: Add nick history table. X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonstatdb.git;a=commitdiff_plain;h=5468e4e0d2f15e96aa090e62ecd5ec009f60a923;ds=sidebyside Add nick history table. --- diff --git a/build/build_full.sql b/build/build_full.sql index 43ab506..5ee1362 100755 --- a/build/build_full.sql +++ b/build/build_full.sql @@ -1,4 +1,5 @@ -- drop tables first in reverse order +drop table if exists player_nicks cascade; drop table if exists db_version cascade; drop table if exists hashkeys cascade; drop table if exists player_weapon_stats cascade; @@ -31,6 +32,7 @@ drop table if exists players cascade; \i tables/player_weapon_stats.tab \i tables/hashkeys.tab \i tables/db_version.tab +\i tables/player_nicks.tab begin; diff --git a/tables/player_nicks.tab b/tables/player_nicks.tab new file mode 100644 index 0000000..7e7ed6f --- /dev/null +++ b/tables/player_nicks.tab @@ -0,0 +1,15 @@ +CREATE TABLE xonstat.player_nicks +( + player_id integer NOT NULL, + stripped_nick character varying(64) NOT NULL, + nick character varying(64) NOT NULL, + create_dt timestamp without time zone NOT NULL DEFAULT now(), + CONSTRAINT player_nicks_pk PRIMARY KEY (player_id, stripped_nick), + CONSTRAINT player_nicks_fk01 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_nicks OWNER TO xonstat;