-- 005-sku-aliases.sql
-- Map macservice asset SKUs to TTS invoice SKUs for auto-matching scanned
-- SP# serials to order line items. Apple often ships color variants under
-- different part numbers (e.g. MXK62LL/A silver, MXK32LL/A space gray) that
-- TTS treats as interchangeable for wholesale; this table captures those
-- mappings so the Inventory Scan flow on order detail finds the right line.

CREATE TABLE IF NOT EXISTS sku_aliases (
  macservice_sku VARCHAR(64) PRIMARY KEY,
  invoice_sku    VARCHAR(64) NOT NULL,
  notes          TEXT,
  created_at     TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
