The catalogue of games. Games are created and updated by the game catalog service, which publishes reviewed candidates.
| Name |
Type |
Default |
Nullable |
Children |
Parents |
Comment |
| id |
bigint |
nextval(‘game_seq’::regclass) |
false |
public.expansion public.playset public.match |
|
|
| public_id |
uuid |
gen_random_uuid() |
false |
|
|
|
| display_name |
varchar(255) |
|
false |
|
|
|
| description |
text |
|
false |
|
|
|
| min_players |
integer |
|
false |
|
|
|
| max_players |
integer |
|
false |
|
|
|
| image_url |
varchar(500) |
|
true |
|
|
|
| tags |
text[] |
‘{}’::text[] |
false |
|
|
|
| score_type |
varchar(16) |
|
false |
|
|
|
| win_condition |
varchar(16) |
|
true |
|
|
|
| source_ref |
varchar(64) |
|
true |
|
|
Where the game came from, e.g. ‘bgg:199792’. Unique, so publishing the same source twice is refused (409) and the catalog links its candidate to the existing game. NULL for a game entered by hand. |
| created_at |
timestamp with time zone |
now() |
false |
|
|
|
| updated_at |
timestamp with time zone |
|
true |
|
|
|
| version |
bigint |
|
false |
|
|
|
| Name |
Type |
Definition |
| chk_game_player_range |
CHECK |
CHECK (((min_players >= 1) AND (max_players >= min_players))) |
| chk_game_score_type |
CHECK |
CHECK (((score_type)::text = ANY ((ARRAY[‘SCORE’::character varying, ‘TIME’::character varying, ‘TURNS’::character varying, ‘WIN_LOSS’::character varying])::text[]))) |
| chk_game_win_condition |
CHECK |
CHECK (((((score_type)::text = ‘WIN_LOSS’::text) AND (win_condition IS NULL)) OR (((score_type)::text <> ‘WIN_LOSS’::text) AND ((win_condition)::text = ANY ((ARRAY[‘HIGHER_WINS’::character varying, ‘LOWER_WINS’::character varying])::text[]))))) |
| game_pkey |
PRIMARY KEY |
PRIMARY KEY (id) |
| uq_game_public_id |
UNIQUE |
UNIQUE (public_id) |
| uq_game_source_ref |
UNIQUE |
UNIQUE (source_ref) |
| Name |
Definition |
| game_pkey |
CREATE UNIQUE INDEX game_pkey ON public.game USING btree (id) |
| uq_game_public_id |
CREATE UNIQUE INDEX uq_game_public_id ON public.game USING btree (public_id) |
| uq_game_source_ref |
CREATE UNIQUE INDEX uq_game_source_ref ON public.game USING btree (source_ref) |

Generated by tbls