Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Wheels — Merge

Merge wheel products into a primary product. Redirects all business references from secondary product(s) to the primary using Proc_MergeProduct, then deletes the secondaries.

Modes

  • Duplicate mode (single -p): Finds all products with the same part number. First match becomes primary, rest are merged into it.
  • Cross-part-number mode (multiple -p): First -p is the primary (kept), remaining -p values are secondaries (merged and deleted).
  • All mode (--all): Finds and merges all duplicate part numbers in the database.
Usage: efision -r <region> wheels merge [-p <pn>... | --all [--dry-run]] [--skip-vouchers]
FlagShortDefaultDescription
--part-number-p(none)Part number(s). Single: merge duplicates. Multiple: first is primary, rest are secondaries.
--allfalseMerge ALL duplicate part numbers in the database
--dry-runfalseShow duplicates without merging (only with --all)
--skip-vouchersfalseSkip updating VoucherItem accounting records

What the Merge Does

  • Updates all references to the secondary product across 18 business tables
  • Optionally updates VoucherItem accounting memos (enabled by default)
  • Deletes the secondary product records (CategoryProduct, ProductWheels, Product)
  • All operations within a single database transaction

Examples

Merge duplicates (same part number):

efision -r demo wheels merge -p "W-18x8-BK"

Merge different part numbers:

efision -r demo wheels merge -p "W-18x8-BK-A" -p "W-18x8-BK-B" -p "W-18x8-BK-C"

Merge all duplicates (dry run):

efision -r demo wheels merge --all --dry-run

Skip voucher handling:

efision -r demo wheels merge -p "W-18x8-BK" --skip-vouchers