Align legacy post snapshots with bDS2.

This commit is contained in:
2026-07-21 22:54:06 +02:00
parent 535303e8b5
commit b8014e0a10
7 changed files with 111 additions and 160 deletions

View File

@@ -107,9 +107,9 @@ entity Post {
updated_at: Timestamp
published_at: Timestamp?
-- Published snapshot: copy of title/content/tags/categories/excerpt as of
-- the last publish. Used by changes_affect_published_content to decide when
-- an edit reopens a published post to draft (see ReopenPublishedPost).
-- Legacy bDS2-compatible columns. Publishing does not populate them and
-- application behaviour does not depend on them; imported non-null values
-- remain passive database data.
published_title: String?
published_content: String?
published_tags: String?
@@ -200,6 +200,9 @@ rule ReopenPublishedPost {
when: UpdatePostRequested(post, changes)
requires: post.status = published
requires: changes_affect_published_content(changes)
-- Compares supplied metadata with the current post fields and supplied
-- content with the canonical file body. Legacy published_* columns are
-- not consulted because bDS2 does not populate them.
ensures: post.status = draft
}