-- FinOps database. Apply after 047, before deploying the new Gold loader.
-- Stop Azure publishers during deployment. No historical Gold rows are changed.
-- Existing dates start unverified; reconcile rebuilds them from verified FOCUS.
CREATE TABLE IF NOT EXISTS azure_sponsorship_gold_materialization (
    usage_date DATE NOT NULL,
    source_revision BIGINT UNSIGNED NOT NULL,
    gold_revision BIGINT UNSIGNED NOT NULL,
    ingestion_run_id CHAR(36) NOT NULL,
    materialized_at DATETIME(6) NOT NULL,
    PRIMARY KEY (usage_date)
) ENGINE=InnoDB;
