Move document title ownership from document to version

Title is now owned by document_versions, following the same pattern as
classification and document_type. The documents.title column is made
nullable with a TODO to drop it. Backend loads title from a
latest_versions CTE for ordering purposes only. The frontend resolves
title from the latest version, and DocumentTitleForm now operates on
DocumentVersion using UpdateDocumentVersion mutation.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-04-07 18:45:46 +02:00
parent ba386d188b
commit b63f043849
20 changed files with 329 additions and 333 deletions

View File

@@ -2562,7 +2562,6 @@ type Evidence implements Node {
type Document implements Node {
id: ID!
title: String!
description: String
currentPublishedMajor: Int
currentPublishedMinor: Int
@@ -4676,8 +4675,6 @@ input CreateDocumentInput {
input UpdateDocumentInput {
id: ID!
title: String
content: String
trustCenterVisibility: TrustCenterVisibility
defaultApproverIds: [ID!]
}
@@ -5945,6 +5942,7 @@ input DeleteDraftDocumentVersionInput {
input UpdateDocumentVersionInput {
documentVersionId: ID!
title: String
content: String
classification: DocumentClassification
documentType: DocumentType