A proposal to link ghost players to a canonical player. Approval creates a claim edge per ghost player. Invariant (application): deleted ghost players cannot be claimed.
| Name |
Type |
Default |
Nullable |
Children |
Parents |
Comment |
| id |
bigint |
nextval(‘claim_request_seq’::regclass) |
false |
public.claim_request_target public.claim_edge |
|
|
| public_id |
uuid |
gen_random_uuid() |
false |
|
|
|
| canonical_player_id |
bigint |
|
false |
|
public.canonical_player |
|
| status |
varchar(16) |
‘PENDING’::character varying |
false |
|
|
|
| decided_by_user_id |
bigint |
|
true |
|
public.app_user |
|
| decided_at |
timestamp with time zone |
|
true |
|
|
|
| created_at |
timestamp with time zone |
now() |
false |
|
|
|
| updated_at |
timestamp with time zone |
|
true |
|
|
|
| version |
bigint |
|
false |
|
|
|
| Name |
Type |
Definition |
| chk_claim_request_decided |
CHECK |
CHECK (((((status)::text = ‘PENDING’::text) AND (decided_at IS NULL)) OR (((status)::text <> ‘PENDING’::text) AND (decided_at IS NOT NULL)))) |
| chk_claim_request_status |
CHECK |
CHECK (((status)::text = ANY ((ARRAY[‘PENDING’::character varying, ‘APPROVED’::character varying, ‘REJECTED’::character varying])::text[]))) |
| fk_claim_request_decided_by_user_id |
FOREIGN KEY |
FOREIGN KEY (decided_by_user_id) REFERENCES app_user(id) |
| fk_claim_request_canonical_player_id |
FOREIGN KEY |
FOREIGN KEY (canonical_player_id) REFERENCES canonical_player(id) |
| claim_request_pkey |
PRIMARY KEY |
PRIMARY KEY (id) |
| uq_claim_request_public_id |
UNIQUE |
UNIQUE (public_id) |
| Name |
Definition |
| claim_request_pkey |
CREATE UNIQUE INDEX claim_request_pkey ON public.claim_request USING btree (id) |
| uq_claim_request_public_id |
CREATE UNIQUE INDEX uq_claim_request_public_id ON public.claim_request USING btree (public_id) |
| ix_claim_request_canonical_player_id |
CREATE INDEX ix_claim_request_canonical_player_id ON public.claim_request USING btree (canonical_player_id) |
| ix_claim_request_decided_by_user_id |
CREATE INDEX ix_claim_request_decided_by_user_id ON public.claim_request USING btree (decided_by_user_id) |

Generated by tbls