-- Phase 4 only — non-runtime augmentation.
-- Override proposals are audit-only and never change fitment outcomes.

-- LEGACY_READ
-- LEGACY TABLE WARNING:
-- product_fitment is deprecated and must not be used for
-- fitment evaluation, confidence scoring, or reconciliation.
-- Use fitment_resolved instead.
CREATE TABLE IF NOT EXISTS product_fitment_overrides_audit (
    id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    product_id BIGINT UNSIGNED NOT NULL,
    proposed_action VARCHAR(64) NOT NULL DEFAULT '',
    rationale TEXT NOT NULL,
    status VARCHAR(32) NOT NULL DEFAULT 'proposed',
    created_by VARCHAR(80) NOT NULL DEFAULT '',
    created_at DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00',
    INDEX idx_overrides_product (product_id),
    INDEX idx_overrides_status (status)
);
