forked from farhoodlabs/paperclip
Add issue document revision restore flow
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
ALTER TABLE "document_revisions" ADD COLUMN "title" text;--> statement-breakpoint
|
||||
ALTER TABLE "document_revisions" ADD COLUMN "format" text DEFAULT 'markdown' NOT NULL;--> statement-breakpoint
|
||||
UPDATE "document_revisions" AS "dr"
|
||||
SET
|
||||
"title" = "d"."title",
|
||||
"format" = COALESCE("d"."format", 'markdown')
|
||||
FROM "documents" AS "d"
|
||||
WHERE "d"."id" = "dr"."document_id";
|
||||
File diff suppressed because it is too large
Load Diff
@@ -316,6 +316,13 @@
|
||||
"when": 1774269579794,
|
||||
"tag": "0044_illegal_toad",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 45,
|
||||
"version": "7",
|
||||
"when": 1774531054196,
|
||||
"tag": "0045_breezy_dexter_bennett",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -10,6 +10,8 @@ export const documentRevisions = pgTable(
|
||||
companyId: uuid("company_id").notNull().references(() => companies.id),
|
||||
documentId: uuid("document_id").notNull().references(() => documents.id, { onDelete: "cascade" }),
|
||||
revisionNumber: integer("revision_number").notNull(),
|
||||
title: text("title"),
|
||||
format: text("format").notNull().default("markdown"),
|
||||
body: text("body").notNull(),
|
||||
changeSummary: text("change_summary"),
|
||||
createdByAgentId: uuid("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
|
||||
|
||||
Reference in New Issue
Block a user