Skip to content

content_report / cms ​

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 đè.

5 bảng. Quay lại content_report.

cms_articles ​

P4-17. CMS article aggregate: slug, status, draft-head and published version pointers, schedule, soft delete.

public.cms_articles · 18 cột · 9 check · 0 unique · 3 index · 3 policy · 8 trigger · RLS bật

CộtKiểuKhoáMô tả
iduuidNOT NULLPK FK → content_versions
slugtextNOT NULL
localetextNOT NULL
statustextNOT NULL
latest_version_nointegerNOT NULL
published_version_nointegerFK → content_versions
publish_attimestamptz
published_attimestamptz
published_byuuidFK → accounts
unpublished_attimestamptz
unpublished_byuuidFK → accounts
created_byuuidNOT NULLFK → accounts
updated_byuuidNOT NULLFK → accounts
created_attimestamptzNOT NULL
updated_attimestamptzNOT NULL
versionintegerNOT NULL
deleted_attimestamptz
deleted_byuuidFK → accounts

Khoá chính: id

Trỏ ra (6):

  • created_by → accounts · ON DELETE RESTRICT
  • deleted_by → accounts · ON DELETE RESTRICT
  • published_by → accounts · ON DELETE RESTRICT
  • id, published_version_no → content_versions · ON DELETE RESTRICT
  • unpublished_by → accounts · ON DELETE RESTRICT
  • updated_by → accounts · ON DELETE RESTRICT

Được trỏ tới (2): content_versions, content_versions

cms_categories ​

P4-17. CMS article category tree (A-CMS-06): unique slug, acyclic parent, active flag, version, no delete.

public.cms_categories · 11 cột · 5 check · 1 unique · 3 index · 3 policy · 5 trigger · RLS bật

CộtKiểuKhoáMô tả
iduuidNOT NULLPK
nametextNOT NULL
slugtextNOT NULL
descriptiontext
parent_iduuidFK → cms_categories
is_activebooleanNOT NULL
created_byuuidNOT NULLFK → accounts
updated_byuuidNOT NULLFK → accounts
created_attimestamptzNOT NULL
updated_attimestamptzNOT NULL
versionintegerNOT NULL

Khoá chính: id

Trỏ ra (3):

  • created_by → accounts · ON DELETE RESTRICT
  • parent_id → cms_categories · ON DELETE RESTRICT
  • updated_by → accounts · ON DELETE RESTRICT

Được trỏ tới (2): cms_categories, content_versions

cms_pages ​

FU-CMS GAP-351. CMS content page aggregate: key (slug), status, draft-head and published version pointers, schedule.

public.cms_pages · 16 cột · 7 check · 0 unique · 3 index · 3 policy · 7 trigger · RLS bật

CộtKiểuKhoáMô tả
iduuidNOT NULLPK FK → content_versions
slugtextNOT NULL
localetextNOT NULL
statustextNOT NULL
latest_version_nointegerNOT NULL
published_version_nointegerFK → content_versions
publish_attimestamptz
published_attimestamptz
published_byuuidFK → accounts
unpublished_attimestamptz
unpublished_byuuidFK → accounts
created_byuuidNOT NULLFK → accounts
updated_byuuidNOT NULLFK → accounts
created_attimestamptzNOT NULL
updated_attimestamptzNOT NULL
versionintegerNOT NULL

Khoá chính: id

Trỏ ra (5):

  • created_by → accounts · ON DELETE RESTRICT
  • published_by → accounts · ON DELETE RESTRICT
  • id, published_version_no → content_versions · ON DELETE RESTRICT
  • unpublished_by → accounts · ON DELETE RESTRICT
  • updated_by → accounts · ON DELETE RESTRICT

Được trỏ tới (2): content_versions, content_versions

cms_banners ​

P4-17. CMS banner aggregate: status, draft-head and published version pointers, hide marker. No delete.

public.cms_banners · 13 cột · 5 check · 0 unique · 2 index · 3 policy · 7 trigger · RLS bật

CộtKiểuKhoáMô tả
iduuidNOT NULLPK FK → content_versions
statustextNOT NULL
latest_version_nointegerNOT NULL
published_version_nointegerFK → content_versions
published_attimestamptz
published_byuuidFK → accounts
hidden_attimestamptz
hidden_byuuidFK → accounts
created_byuuidNOT NULLFK → accounts
updated_byuuidNOT NULLFK → accounts
created_attimestamptzNOT NULL
updated_attimestamptzNOT NULL
versionintegerNOT NULL

Khoá chính: id

Trỏ ra (5):

  • created_by → accounts · ON DELETE RESTRICT
  • hidden_by → accounts · ON DELETE RESTRICT
  • published_by → accounts · ON DELETE RESTRICT
  • id, published_version_no → content_versions · ON DELETE RESTRICT
  • updated_by → accounts · ON DELETE RESTRICT

Được trỏ tới (1): content_versions

cms_keywords ​

P4-17. CMS keywords (A-CMS-07): live-unique normalized slug, rename keeps id, soft delete only when unused.

public.cms_keywords · 10 cột · 4 check · 0 unique · 2 index · 3 policy · 6 trigger · RLS bật

CộtKiểuKhoáMô tả
iduuidNOT NULLPK
nametextNOT NULL
normalized_keywordtextNOT NULL
created_byuuidNOT NULLFK → accounts
updated_byuuidNOT NULLFK → accounts
created_attimestamptzNOT NULL
updated_attimestamptzNOT NULL
versionintegerNOT NULL
deleted_attimestamptz
deleted_byuuidFK → accounts

Khoá chính: id

Trỏ ra (3):

  • created_by → accounts · ON DELETE RESTRICT
  • deleted_by → accounts · ON DELETE RESTRICT
  • updated_by → accounts · ON DELETE RESTRICT

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

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17