]> de.git.xonotic.org Git - xonotic/xonstatdb.git/blob - tables/server_hashkeys.tab
Ensure that the hashkeys for player and server are unique, as they are used for lookup.
[xonotic/xonstatdb.git] / tables / server_hashkeys.tab
1 CREATE TABLE xonstat.server_hashkeys
2 (
3   server_id integer NOT NULL,
4   hashkey character varying(44) NOT NULL,
5   active_ind boolean NOT NULL DEFAULT true,
6   create_dt timestamp without time zone NOT NULL DEFAULT now(),
7   CONSTRAINT server_hashkeys_pk PRIMARY KEY (server_id, hashkey),
8   CONSTRAINT server_hashkeys_fk001 FOREIGN KEY (server_id)
9       REFERENCES xonstat.servers (server_id) MATCH SIMPLE
10       ON UPDATE NO ACTION ON DELETE NO ACTION,
11   CONSTRAINT server_hashkeys_uk001 UNIQUE (hashkey)
12 )
13 WITH (
14   OIDS=FALSE
15 );
16 ALTER TABLE xonstat.server_hashkeys OWNER TO xonstat;