The approved, revocable link between a canonical player and a ghost player. Invariant (application): the claim edge of a user’s self ghost player is never revoked.
| Name |
Type |
Default |
Nullable |
Children |
Parents |
Comment |
| id |
bigint |
nextval(‘claim_edge_seq’::regclass) |
false |
|
|
|
| public_id |
uuid |
gen_random_uuid() |
false |
|
|
|
| canonical_player_id |
bigint |
|
false |
|
public.canonical_player |
|
| ghost_player_id |
bigint |
|
false |
|
public.ghost_player |
|
| created_via_claim_request_id |
bigint |
|
true |
|
public.claim_request |
|
| revoked_at |
timestamp with time zone |
|
true |
|
|
|
| revoked_by_user_id |
bigint |
|
true |
|
public.app_user |
|
| created_at |
timestamp with time zone |
now() |
false |
|
|
|
| updated_at |
timestamp with time zone |
|
true |
|
|
|
| version |
bigint |
|
false |
|
|
|
| Name |
Type |
Definition |
| chk_claim_edge_revoked |
CHECK |
CHECK (((revoked_at IS NOT NULL) OR (revoked_by_user_id IS NULL))) |
| fk_claim_edge_revoked_by_user_id |
FOREIGN KEY |
FOREIGN KEY (revoked_by_user_id) REFERENCES app_user(id) |
| fk_claim_edge_canonical_player_id |
FOREIGN KEY |
FOREIGN KEY (canonical_player_id) REFERENCES canonical_player(id) |
| fk_claim_edge_ghost_player_id |
FOREIGN KEY |
FOREIGN KEY (ghost_player_id) REFERENCES ghost_player(id) |
| fk_claim_edge_created_via_claim_request_id |
FOREIGN KEY |
FOREIGN KEY (created_via_claim_request_id) REFERENCES claim_request(id) |
| claim_edge_pkey |
PRIMARY KEY |
PRIMARY KEY (id) |
| uq_claim_edge_public_id |
UNIQUE |
UNIQUE (public_id) |
| Name |
Definition |
| claim_edge_pkey |
CREATE UNIQUE INDEX claim_edge_pkey ON public.claim_edge USING btree (id) |
| uq_claim_edge_public_id |
CREATE UNIQUE INDEX uq_claim_edge_public_id ON public.claim_edge USING btree (public_id) |
| uq_claim_edge_ghost_player_id_active |
CREATE UNIQUE INDEX uq_claim_edge_ghost_player_id_active ON public.claim_edge USING btree (ghost_player_id) WHERE (revoked_at IS NULL) |
| ix_claim_edge_canonical_player_id |
CREATE INDEX ix_claim_edge_canonical_player_id ON public.claim_edge USING btree (canonical_player_id) |
| ix_claim_edge_created_via_claim_request_id |
CREATE INDEX ix_claim_edge_created_via_claim_request_id ON public.claim_edge USING btree (created_via_claim_request_id) |
| ix_claim_edge_revoked_by_user_id |
CREATE INDEX ix_claim_edge_revoked_by_user_id ON public.claim_edge USING btree (revoked_by_user_id) |

Generated by tbls