fix(migrations): add missing migration for processing columns in documents table (#1749)

This commit is contained in:
Waleed
2025-10-27 23:23:42 -07:00
committed by GitHub
parent 9df886d1e9
commit ef5b6999ab
3 changed files with 7108 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
ALTER TABLE "document" ADD COLUMN IF NOT EXISTS "processing_status" text DEFAULT 'pending' NOT NULL;
ALTER TABLE "document" ADD COLUMN IF NOT EXISTS "processing_started_at" timestamp;
ALTER TABLE "document" ADD COLUMN IF NOT EXISTS "processing_completed_at" timestamp;
ALTER TABLE "document" ADD COLUMN IF NOT EXISTS "processing_error" text;
CREATE INDEX IF NOT EXISTS "doc_processing_status_idx" ON "document" USING btree ("knowledge_base_id","processing_status");
ALTER TABLE "document" ADD COLUMN IF NOT EXISTS "processing_status" text DEFAULT 'pending' NOT NULL;--> statement-breakpoint
ALTER TABLE "document" ADD COLUMN IF NOT EXISTS "processing_started_at" timestamp;--> statement-breakpoint
ALTER TABLE "document" ADD COLUMN IF NOT EXISTS "processing_completed_at" timestamp;--> statement-breakpoint
ALTER TABLE "document" ADD COLUMN IF NOT EXISTS "processing_error" text;--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "doc_processing_status_idx" ON "document" USING btree ("knowledge_base_id","processing_status");

File diff suppressed because it is too large Load Diff

View File

@@ -701,6 +701,13 @@
"when": 1760661127478,
"tag": "0100_public_black_cat",
"breakpoints": true
},
{
"idx": 101,
"version": "7",
"when": 1761631932261,
"tag": "0101_missing_doc_processing",
"breakpoints": true
}
]
}