WFDASH-WEBAPP/scripts/migrations
Dave cb0113f9f4 feat: add item supplier payments and approvals queue
Keep payment holds independent of workflow and margin approval. Require proof before collection readiness; deduplicate uploads transactionally in PocketBase and preserve payment history.

Includes schema migration, deployment runbook, browser checks and isolated PocketBase regression coverage. Full suite has 5156 passing tests and retains two pre-existing script-import errors.
2026-11-03 01:27:07 +02:00
..
2026-06-23-add-quote-attachments-direction.ts
2026-06-23-add-quote-email-composition-fields.ts
2026-06-23-add-quote-outbound-email-fields.ts
2026-06-23-add-quote-template-fields.ts
2026-06-26-add-orders-rep.ts
2026-06-27-add-order-quote-match-fields.ts
2026-06-27-drop-orders-status-and-wipe.ts
2026-06-28-add-companies-coordinates.ts
2026-06-28-add-purchase-order-pdfs.ts
2026-06-28-convert-customer-fields.ts
2026-06-30-add-price-list-search-text.ts
2026-06-30-add-price-list-sku-normalised.ts
2026-06-30-add-price-list-source-file.ts
2026-06-30-add-pricelist-notes.ts
2026-06-30-add-quote-items-sku-and-pricing.ts
2026-06-30-add-raw-price-list.ts
2026-06-30-backfill-price-list-search-text.ts
2026-06-30-create-rfq-outbound.ts
2026-07-02-add-sprint-categories-and-claims.ts
2026-07-06-order-items-assigned-at.ts
2026-07-06-order-items-collection-pool-rename.ts
2026-07-06-order-items-nullable-numbers.ts
2026-07-06-order-items-pricing-fields.ts
2026-07-06-purchase-orders-documents-field.ts
2026-07-06-purchase-orders-send-fields.ts
2026-07-06-quote-attachments-quote-item-and-kind.ts
2026-07-07-backfill-assigned-rfc.ts
2026-07-07-order-items-collection-photo.ts
2026-07-07-order-items-ready-for-collection.ts
2026-07-09-po-additional-attachments.ts
2026-07-09-po-pdf-tokens.ts
2026-07-10-restore-counters.ts
2026-07-14-create-stock-purchases.ts
2026-07-14-create-stock.ts
2026-07-15-add-stock-items-target-qty.ts
2026-07-15-add-stock-line-drv-id.ts
2026-07-15-stock-purchase-line-state.ts
2026-07-16-add-stock-purchase-documents-history.ts
2026-07-16-add-stock-purchase-send-statuses.ts
2026-07-17-add-stock-purchase-problem-fields.ts
2026-07-19-create-delivery-notes.ts
2026-07-19-delivery-notes-signed-copy.ts
2026-07-19-delivery-notes-v3.ts
2026-07-20-delivery-tracking.ts
2026-07-24-partial-approval.ts
2026-07-25-add-ai-insights-fields.ts
2026-07-26-fix-quote-counter-and-reassign-numbers.ts
2026-08-03-add-stock-pricing-and-cost-history.ts
2026-08-04-add-order-items-item-status-index.ts
2026-08-04-add-quotes-status-index.ts
2026-08-06-add-stock-purchase-booked-fields.ts
2026-08-06-stock-purchases-additional-attachments.ts feat(pb): add stock_purchases.additional_attachments file field (migration) 2026-08-06 23:32:12 +02:00
2026-08-07-flip-stale-unprocessed-items.js fix(sprint): filter stale quote items, add cleanup migrations 2026-08-07 20:15:46 +02:00
2026-08-07-renumber-duplicate-quotes.js fix(sprint): filter stale quote items, add cleanup migrations 2026-08-07 20:15:46 +02:00
2026-08-07-stock-purchase-items-catalogue-fields.ts feat: add split-invoice stock PO workflow and supporting tooling 2026-08-07 00:53:29 +02:00
2026-08-08-add-quotes-ai-status.ts feat: add AI quote processing pipeline and admin settings UI 2026-08-09 16:17:29 +02:00
2026-08-09-add-ai-settings.ts feat: add AI quote processing pipeline and admin settings UI 2026-08-09 16:17:29 +02:00
2026-08-09-add-ai-system-prompt.ts feat: add AI quote processing pipeline and admin settings UI 2026-08-09 16:17:29 +02:00
2026-08-09-backfill-quote-validity-days.ts fix: correct quote expiry handling for PocketBase's 0 default 2026-08-11 08:32:17 +02:00
2026-08-09-repair-stock-double-booking.ts feat: add split views, stock picking slips, and invoice viewer 2026-08-09 23:16:55 +02:00
2026-08-13-fix-delivery-notes-relations.ts feat(delivery-notes, migrations): add tabs, grouping, markup, and fix DN relations 2026-08-14 09:41:14 +02:00
2026-08-17-add-order-items-in-stock.ts feat(collection-confirm): implement confirmation dialog for stock collection 2026-08-17 11:41:55 +02:00
2026-08-29-add-order-delivery-note-match-fields.ts feat(orders): add delivery-note repeat-order match fields 2026-08-30 12:57:16 +02:00
2026-09-04-create-pos-slip-layouts.ts chore(pos): add pos_slip_layouts PB collection for the slip layout editor 2026-09-04 12:46:17 +02:00
2026-09-09-add-quotes-attachment-fields.ts feat(quotes): split attachments into internal vs outbound with operator upload UI 2026-09-09 13:43:56 +02:00
2026-09-09-fix-quote-attachment-fields-maxselect.ts feat(quotes): split attachments into internal vs outbound with operator upload UI 2026-09-09 13:43:56 +02:00
2026-09-09-migrate-quote-attachments-to-fields.ts feat(quotes): split attachments into internal vs outbound with operator upload UI 2026-09-09 13:43:56 +02:00
2026-09-25-backfill-invoice-reconcile.ts feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
2026-09-25-create-audit-log.ts feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
2026-09-28-create-place-overrides.ts feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
2026-09-28-create-rep-trip-legs.ts feat(audit): implement audit trail for delivery notes and orders 2026-09-30 01:48:44 +02:00
2026-09-30-create-giellie-chats.ts feat(giellie): chat store and giellie_chats migration 2026-09-30 23:44:55 +02:00
2026-10-03-add-pos-sales-delivery-note.ts feat(pos): raise a system delivery note on an account sale 2026-10-04 13:15:29 +02:00
2026-10-07-add-pos-sales-refund-fields.ts feat(pos): refund a whole sale, put the goods back, print a credit slip 2026-10-07 23:41:09 +02:00
2026-10-16-add-quote-assistant-fields.ts feat(quote-assistant): data model, settings fields, migration 2026-10-16 19:07:52 +02:00
2026-10-17-add-collection-ai.ts feat(collection-ai): card check, tick and list passthrough 2026-10-17 02:14:53 +02:00
2026-10-19-po-number-unique-index.ts fix: number customer POs one at a time (duplicate PO numbers) 2026-10-19 15:08:12 +02:00
2026-10-19-stock-photos-multi.ts feat(collection-confirm): collected stock orders go through Collection Confirm 2026-10-19 17:03:33 +02:00
2026-10-24-add-order-assistant-fields.ts feat(orders): fields and settings for the AI order assistant 2026-10-24 12:56:51 +02:00
2026-10-28-add-collection-auto-push.ts feat(collection-confirm): auto-push purple cards on to invoicing, with a 2-day log 2026-10-28 11:36:23 +02:00
2026-10-30-add-delivery-pool-fields.ts feat(delivery-pool): assign invoiced deliveries to drivers, close with the signed copy 2026-10-31 09:55:35 +02:00
2026-10-30-add-quote-email-to.ts feat(quotes): record who a quote is sent to (email_to) 2026-10-30 23:32:39 +02:00
2026-10-30-add-stock-pool-pending.ts feat(collection-pool): stock lines can go back to pending and be marked ready 2026-10-30 22:08:19 +02:00
2026-10-31-add-company-letterhead.ts Lock quote letterheads to customer companies 2026-10-31 10:20:23 +02:00
2026-11-02-order-payments.ts feat: add item supplier payments and approvals queue 2026-11-03 01:27:07 +02:00
_env-loader.ts feat(delivery-notes, migrations): add tabs, grouping, markup, and fix DN relations 2026-08-14 09:41:14 +02:00
add-pos-sale-discount-fields.ts feat: implement discount functionality in POS system 2026-09-03 12:19:21 +02:00
add-quote-items-user-edited.ts
broaden-quote-attachments-mime-types.ts
create-order-items-v2-and-collection-pool.ts
create-quote-attachments-and-replies.ts