feat(documents): file scanner inbox documents with folder and type
This commit is contained in:
1
backend/db/migrations/0074_scanner_inbox_filing.sql
Normal file
1
backend/db/migrations/0074_scanner_inbox_filing.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "scanner_inbox_documents" ADD COLUMN "filed_at" timestamp with time zone;
|
||||
@@ -498,6 +498,13 @@
|
||||
"when": 1790640000000,
|
||||
"tag": "0073_scanner_document_inbox",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 71,
|
||||
"version": "7",
|
||||
"when": 1790640000001,
|
||||
"tag": "0074_scanner_inbox_filing",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export const scannerInboxDocuments = pgTable("scanner_inbox_documents", {
|
||||
remoteFilename: text("remote_filename").notNull(),
|
||||
checksum: text("checksum").notNull(),
|
||||
receivedAt: timestamp("received_at", { withTimezone: true }).notNull().defaultNow(),
|
||||
filedAt: timestamp("filed_at", { withTimezone: true }),
|
||||
}, table => ({
|
||||
filenameKey: uniqueIndex("scanner_inbox_documents_filename_key").on(table.tenantId, table.remoteFilename),
|
||||
receivedIdx: index("scanner_inbox_documents_received_idx").on(table.tenantId, table.receivedAt),
|
||||
|
||||
Reference in New Issue
Block a user