Files
PriceForge/migrations/041_add_is_pattern_to_seen.sql
Mikhail Chusavitin f73e3d144d Vendor mapping: wildcard ignore patterns, bulk CSV import, multi-lot qty
- Add glob pattern support (* and ?) for ignore rules stored in
  qt_vendor_partnumber_seen (is_pattern flag, migration 041)
- Pattern matching applied in stock/competitor import, partnumber book
  snapshot, and vendor mappings list (Go-side via NormalizeKey)
- BulkUpsertMappings: replace N+1 loop with two batch SQL upserts,
  validating all lots in a single query (~1500 queries → 3-4)
- CSV import: multi-lot per PN via repeated rows, optional qty column
- CSV export: updated column format vendor;partnumber;lot_name;qty;description;ignore;notes
- UI: ignore patterns section with add/delete, import progress feedback
- Update bible-local/vendor-mapping.md with new CSV format

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 09:41:48 +03:00

6 lines
346 B
SQL

-- Add is_pattern flag to qt_vendor_partnumber_seen.
-- Rows with is_pattern=1 store glob patterns (*, ?) used for wildcard ignore rules.
-- Pattern rows are excluded from the regular seen-registry listing and from PN book snapshots.
ALTER TABLE qt_vendor_partnumber_seen
ADD COLUMN is_pattern TINYINT(1) NOT NULL DEFAULT 0 AFTER is_ignored;