]> de.git.xonotic.org Git - xonotic/xonstatdb.git/blob - tables/achievements.tab
Change foreign keys from serial to integer.
[xonotic/xonstatdb.git] / tables / achievements.tab
1 CREATE TABLE xonstat.achievements
2 (
3   achievement_id serial NOT NULL,
4   achievement_cd integer NOT NULL,
5   player_id integer NOT NULL,
6   create_dt timestamp with time zone NOT NULL DEFAULT now(),
7   CONSTRAINT achievements_pk PRIMARY KEY (achievement_id),
8   CONSTRAINT achievements_fk001 FOREIGN KEY (achievement_cd)
9       REFERENCES xonstat.cd_achievement (achievement_cd) MATCH SIMPLE
10       ON UPDATE NO ACTION ON DELETE NO ACTION,
11   CONSTRAINT achievements_fk002 FOREIGN KEY (player_id)
12       REFERENCES xonstat.players (player_id) MATCH SIMPLE
13       ON UPDATE NO ACTION ON DELETE NO ACTION
14 )
15 WITH (
16   OIDS=FALSE
17 );
18 ALTER TABLE xonstat.achievements OWNER TO xonstat;