2 -- briskin5 (bin5) related tables
5 DROP TABLE #PFX#bin5_matches;
6 CREATE TABLE #PFX#bin5_matches (
7 code SERIAL PRIMARY KEY,
8 ttok text UNIQUE, -- token associated to the match
9 tidx integer -- table index
12 DROP TABLE #PFX#bin5_games;
13 CREATE TABLE #PFX#bin5_games (
14 code SERIAL PRIMARY KEY,
15 mcode integer REFERENCES #PFX#bin5_matches (code) ON DELETE cascade ON UPDATE cascade,
16 tstamp timestamp -- end game time
19 DROP TABLE #PFX#bin5_points;
20 CREATE TABLE #PFX#bin5_points (
21 gcode integer REFERENCES #PFX#bin5_games (code) ON DELETE cascade ON UPDATE cascade,
22 ucode integer REFERENCES #PFX#users (code) ON DELETE cascade ON UPDATE cascade,