WFDASH-WEBAPP/scripts/migrations
Dave 4dbe28147d feat(orders): fields and settings for the AI order assistant
Task 3 of the AI order assistant plan.

- types: OrderAiQuoteMatch, OrderAiLinePair, OrderItemAiFill,
  OrderAssistantRunSummary; Order.ai_quote_match, OrderItem.ai_fill,
  OrderItem.quote_item
- ai_settings: order_assistant_enabled (off), _interval_minutes (10,
  5-1440), _auto_link (on), _fill_lines (on), _prompt, _last_run_at,
  _last_run_summary; recordOrderAssistantRun()
- migration script + npm run pb:migrate:order-assistant (not run)
- audit_log_utils IGNORED_FIELDS: ai_quote_match, ai_fill

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 12:56:51 +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
2026-08-07-flip-stale-unprocessed-items.js
2026-08-07-renumber-duplicate-quotes.js
2026-08-07-stock-purchase-items-catalogue-fields.ts
2026-08-08-add-quotes-ai-status.ts
2026-08-09-add-ai-settings.ts
2026-08-09-add-ai-system-prompt.ts
2026-08-09-backfill-quote-validity-days.ts
2026-08-09-repair-stock-double-booking.ts
2026-08-13-fix-delivery-notes-relations.ts
2026-08-17-add-order-items-in-stock.ts
2026-08-29-add-order-delivery-note-match-fields.ts
2026-09-04-create-pos-slip-layouts.ts
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
_env-loader.ts
add-pos-sale-discount-fields.ts
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