Skip to content

trusted_editor

A grant by which a match recorder (grantor) has the match edits of the trustee approved automatically.

Name Type Default Nullable Children Parents Comment
id bigint nextval(‘trusted_editor_seq’::regclass) false
public_id uuid gen_random_uuid() false
grantor_user_id bigint false public.app_user
trustee_user_id bigint false public.app_user
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_trusted_editor_not_self CHECK CHECK ((grantor_user_id <> trustee_user_id))
chk_trusted_editor_revoked CHECK CHECK (((revoked_at IS NOT NULL) OR (revoked_by_user_id IS NULL)))
fk_trusted_editor_grantor_user_id FOREIGN KEY FOREIGN KEY (grantor_user_id) REFERENCES app_user(id)
fk_trusted_editor_revoked_by_user_id FOREIGN KEY FOREIGN KEY (revoked_by_user_id) REFERENCES app_user(id)
fk_trusted_editor_trustee_user_id FOREIGN KEY FOREIGN KEY (trustee_user_id) REFERENCES app_user(id)
trusted_editor_pkey PRIMARY KEY PRIMARY KEY (id)
uq_trusted_editor_public_id UNIQUE UNIQUE (public_id)
Name Definition
trusted_editor_pkey CREATE UNIQUE INDEX trusted_editor_pkey ON public.trusted_editor USING btree (id)
uq_trusted_editor_public_id CREATE UNIQUE INDEX uq_trusted_editor_public_id ON public.trusted_editor USING btree (public_id)
uq_trusted_editor_grantor_user_id_trustee_user_id_active CREATE UNIQUE INDEX uq_trusted_editor_grantor_user_id_trustee_user_id_active ON public.trusted_editor USING btree (grantor_user_id, trustee_user_id) WHERE (revoked_at IS NULL)
ix_trusted_editor_trustee_user_id CREATE INDEX ix_trusted_editor_trustee_user_id ON public.trusted_editor USING btree (trustee_user_id)
ix_trusted_editor_revoked_by_user_id CREATE INDEX ix_trusted_editor_revoked_by_user_id ON public.trusted_editor USING btree (revoked_by_user_id)

ER diagram


Generated by tbls