CREATE TABLE xonstat.achievements ( achievement_id serial NOT NULL, achievement_cd integer NOT NULL, player_id integer NOT NULL, create_dt timestamp without time zone NOT NULL DEFAULT now(), CONSTRAINT achievements_pk PRIMARY KEY (achievement_id), CONSTRAINT achievements_fk001 FOREIGN KEY (achievement_cd) REFERENCES xonstat.cd_achievement (achievement_cd) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT achievements_fk002 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.achievements OWNER TO xonstat;