Improve invoice verification caching with conflict resolution and error handling

Implement unique constraint on invoice verification cache key and handle duplicate entries gracefully in the backend.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d43bd811-9372-45a7-8ac9-4a954c0538e1
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/d43bd811-9372-45a7-8ac9-4a954c0538e1/g5c0JYM
This commit is contained in:
michaelschal committed 2025-08-15 09:48:29 +00:00
1 parent 77e3214491
commit 80ca426a33
4 files changed
+29 -3

No files matched your search

+1 -1
View File
@@ -160,7 +160,7 @@ export const nocodbConfig = pgTable("nocodb_config", {
// Cache de vérification des factures
export const invoiceVerificationCache = pgTable("invoice_verification_cache", {
id: serial("id").primaryKey(),
cacheKey: varchar("cache_key", { length: 255 }).notNull(),
cacheKey: varchar("cache_key", { length: 255 }).notNull().unique(),
groupId: integer("group_id").notNull(),
invoiceReference: varchar("invoice_reference", { length: 255 }).notNull(),
supplierName: varchar("supplier_name", { length: 255 }),