Skip to content

identity / privacy ​

Trang sinh tự động

Sinh từ ad83b0aea — chạy 820 migration lên PostgreSQL 17 rồi đọc pg_catalog. Mô tả bảng và cột lấy từ COMMENT ON. Không sửa tay: lần chạy docgen sau sẽ ghi đè.

4 bảng. Quay lại identity.

privacy_requests ​

P1-14. Data export / deletion requests of a subject; one open request per kind; review by another person.

public.privacy_requests · 17 cột · 12 check · 1 unique · 4 index · 2 policy · 7 trigger · RLS bật

CộtKiểuKhoáMô tả
iduuidNOT NULLPK
account_iduuidNOT NULLFK → accounts
kindtextNOT NULL
statustextNOT NULL
appapp_codeNOT NULL
request_idtextNOT NULL
correlation_idcorrelation_refNOT NULL
reviewed_byuuidFK → accounts
reviewed_attimestamptz
review_reasontext
completed_attimestamptz
change_sourcetextNOT NULL
change_actoruuidFK → accounts
change_reftextNOT NULL
created_attimestamptzNOT NULL
updated_attimestamptzNOT NULL
versionintegerNOT NULL

Khoá chính: id

Trỏ ra (3):

  • account_id → accounts · ON DELETE RESTRICT
  • change_actor → accounts · ON DELETE RESTRICT
  • reviewed_by → accounts · ON DELETE RESTRICT

Được trỏ tới (3): privacy_exports, privacy_purge_records, privacy_request_events

privacy_exports ​

P1-14. Export package of one approved EXPORT request: private object + expiry; OWN download only.

public.privacy_exports · 17 cột · 8 check · 1 unique · 3 index · 1 policy · 5 trigger · RLS bật

CộtKiểuKhoáMô tả
iduuidNOT NULLPK
request_iduuidNOT NULLFK → privacy_requests
account_iduuidNOT NULLFK → accounts
statustextNOT NULL
buckettextNOT NULL
storage_pathtext
file_nametextNOT NULL
size_bytesintegerNOT NULL
sha256textNOT NULL
row_countsjsonbNOT NULL
policy_iduuidNOT NULLFK → retention_policies
run_iduuidNOT NULL
expires_attimestamptzNOT NULL
purged_attimestamptz
created_attimestamptzNOT NULL
updated_attimestamptzNOT NULL
versionintegerNOT NULL

Khoá chính: id

Trỏ ra (3):

  • account_id → accounts · ON DELETE RESTRICT
  • policy_id → retention_policies · ON DELETE RESTRICT
  • request_id → privacy_requests · ON DELETE RESTRICT

Được trỏ tới: không có

privacy_purge_records ​

P1-14. Append-only evidence of every erasure/purge decision per category (outcome, count, policy row).

public.privacy_purge_records · 9 cột · 2 check · 0 unique · 2 index · 0 policy · 2 trigger · RLS bật

CộtKiểuKhoáMô tả
idbigintNOT NULLPK
run_iduuidNOT NULL
request_iduuidFK → privacy_requests
account_iduuidNOT NULLFK → accounts
categorytextNOT NULL
policy_iduuidFK → retention_policies
outcometextNOT NULL
affected_rowsintegerNOT NULL
recorded_attimestamptzNOT NULL

Khoá chính: id

Trỏ ra (3):

  • account_id → accounts · ON DELETE RESTRICT
  • policy_id → retention_policies · ON DELETE RESTRICT
  • request_id → privacy_requests · ON DELETE RESTRICT

Được trỏ tới: không có

privacy_request_events ​

P1-14. Append-only history of every privacy_requests version (who/what/why), written by trigger only.

public.privacy_request_events · 10 cột · 0 check · 1 unique · 2 index · 0 policy · 2 trigger · RLS bật

CộtKiểuKhoáMô tả
idbigintNOT NULLPK
request_iduuidNOT NULLFK → privacy_requests
versionintegerNOT NULL
from_statustext
to_statustextNOT NULL
sourcetextNOT NULL
actor_account_iduuid
reftextNOT NULL
reasontext
recorded_attimestamptzNOT NULL

Khoá chính: id

Trỏ ra (1):

  • request_id → privacy_requests · ON DELETE RESTRICT

Được trỏ tới: không có

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17