-- CostusWorx © 2026 — Feature 6A: Market Data extensions
-- Adds ZAR/USD spot rate (for offshore assets) and soft-delete support.

SET NAMES utf8mb4;

ALTER TABLE market_data
    ADD COLUMN IF NOT EXISTS zar_usd_rate DECIMAL(8,4) DEFAULT NULL
        COMMENT 'ZAR per 1 USD, year-end spot rate — updated manually by admin',
    ADD COLUMN IF NOT EXISTS deleted_at   DATETIME     DEFAULT NULL
        COMMENT 'Soft delete; simulations still reference the row';
