ALTER TABLE inspection_records
    ADD COLUMN IF NOT EXISTS risk_assessment jsonb,
    ADD COLUMN IF NOT EXISTS model_version varchar(64),
    ADD COLUMN IF NOT EXISTS is_mock boolean NOT NULL DEFAULT false;

CREATE INDEX IF NOT EXISTS idx_inspection_records_mock_created_at
    ON inspection_records (is_mock, created_at);
