-- ============================================================================
-- MARS-826-PREHOOK Rollback Script 91: Restore Previous DATA_EXPORTER Version
-- ============================================================================
-- Purpose: Rollback DATA_EXPORTER package to version with A_WORKFLOW_HISTORY_KEY
-- Schema: CT_MRDS
-- Object: PACKAGE BODY DATA_EXPORTER
-- WARNING: This will restore package to state BEFORE A_ETL_LOAD_SET_KEY support
-- ============================================================================

SET SERVEROUTPUT ON SIZE UNLIMITED

PROMPT
PROMPT ============================================================================
PROMPT MARS-826-PREHOOK ROLLBACK: Restoring Previous DATA_EXPORTER Package Body
PROMPT ============================================================================
PROMPT WARNING: This will restore package to use A_WORKFLOW_HISTORY_KEY
PROMPT This rollback is only valid if CT_ODS.A_LOAD_HISTORY column has been
PROMPT reverted to A_WORKFLOW_HISTORY_KEY (not A_ETL_LOAD_SET_KEY)
PROMPT ============================================================================

-- Deploy previous package body from current_version folder (v2.1.0)
@@current_version\DATA_EXPORTER.pkb

PROMPT
PROMPT Package rollback completed.
PROMPT Previous version restored (with A_WORKFLOW_HISTORY_KEY references).
PROMPT
