match_edit_participant_change
Description
Section titled “Description”The new result of one participant, proposed by a match edit.
Columns
Section titled “Columns”| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| id | bigint | nextval(‘match_edit_participant_change_seq’::regclass) | false | |||
| public_id | uuid | gen_random_uuid() | false | |||
| match_edit_id | bigint | false | public.match_edit | |||
| match_participant_id | bigint | false | public.match_participant | |||
| score | numeric(10,2) | true | ||||
| score_set | boolean | false | false | The edit sets the score: written on approval, NULL clears it. Same for rank_set and outcome_set. | ||
| rank | integer | true | ||||
| rank_set | boolean | false | false | |||
| outcome | varchar(16) | true | ||||
| outcome_set | boolean | false | false | |||
| created_at | timestamp with time zone | now() | false | |||
| updated_at | timestamp with time zone | true |
Constraints
Section titled “Constraints”| Name | Type | Definition |
|---|---|---|
| chk_match_edit_participant_change_outcome | CHECK | CHECK (((outcome IS NULL) OR ((outcome)::text = ANY ((ARRAY[‘WIN’::character varying, ‘LOSS’::character varying])::text[])))) |
| chk_match_edit_participant_change_rank | CHECK | CHECK (((rank IS NULL) OR (rank >= 1))) |
| chk_match_edit_participant_change_set | CHECK | CHECK (((score_set OR (score IS NULL)) AND (rank_set OR (rank IS NULL)) AND (outcome_set OR (outcome IS NULL)))) |
| fk_match_edit_participant_change_match_participant_id | FOREIGN KEY | FOREIGN KEY (match_participant_id) REFERENCES match_participant(id) |
| fk_match_edit_participant_change_match_edit_id | FOREIGN KEY | FOREIGN KEY (match_edit_id) REFERENCES match_edit(id) |
| match_edit_participant_change_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| uq_match_edit_participant_change_public_id | UNIQUE | UNIQUE (public_id) |
| uq_match_edit_participant_change_match_edit_participant | UNIQUE | UNIQUE (match_edit_id, match_participant_id) |
Indexes
Section titled “Indexes”| Name | Definition |
|---|---|
| match_edit_participant_change_pkey | CREATE UNIQUE INDEX match_edit_participant_change_pkey ON public.match_edit_participant_change USING btree (id) |
| uq_match_edit_participant_change_public_id | CREATE UNIQUE INDEX uq_match_edit_participant_change_public_id ON public.match_edit_participant_change USING btree (public_id) |
| uq_match_edit_participant_change_match_edit_participant | CREATE UNIQUE INDEX uq_match_edit_participant_change_match_edit_participant ON public.match_edit_participant_change USING btree (match_edit_id, match_participant_id) |
| ix_match_edit_participant_change_match_participant_id | CREATE INDEX ix_match_edit_participant_change_match_participant_id ON public.match_edit_participant_change USING btree (match_participant_id) |
Relations
Section titled “Relations”Generated by tbls