Align legacy post snapshots with bDS2.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ entity Post {
|
||||
language: String? -- ISO 639-1 code
|
||||
do_not_translate: Boolean
|
||||
|
||||
-- Published snapshot columns (written on publish for diff detection)
|
||||
-- Legacy compatibility columns. bDS2 and RuDS leave them unchanged on
|
||||
-- publish and do not use them to determine lifecycle behaviour.
|
||||
published_title: String?
|
||||
published_content: String?
|
||||
published_tags: String?
|
||||
|
||||
Reference in New Issue
Block a user