-- ====================================================================
-- A_TABLE_STAT_HIST Table (rollback_version - pre MARS-1409)
-- ====================================================================
-- Purpose: Store historical table statistics for trend analysis
-- NOTE: This is the pre-MARS-1409 structure without:
--   ARCHIVAL_STRATEGY, ARCH_MINIMUM_AGE_MONTHS, IS_WORKFLOW_SUCCESS_REQUIRED,
--   WORKFLOW_SUCCESS_FILE_COUNT, WORKFLOW_SUCCESS_ROW_COUNT, WORKFLOW_SUCCESS_TOTAL_SIZE
--   Column names: SIZE (not TOTAL_SIZE), OVER_ARCH_THRESOLD_SIZE (not OVER_ARCH_THRESOLD_TOTAL_SIZE)
-- ====================================================================

CREATE TABLE CT_MRDS.A_TABLE_STAT_HIST (
    A_TABLE_STAT_HIST_KEY             NUMBER(38,0) PRIMARY KEY,
    A_SOURCE_FILE_CONFIG_KEY          NUMBER(38,0) NOT NULL,
    TABLE_NAME                        VARCHAR2(200) NOT NULL,
    CREATED                           TIMESTAMP(6) DEFAULT SYSTIMESTAMP,
    ARCH_THRESHOLD_DAYS               NUMBER(4,0),
    FILE_COUNT                        NUMBER(38,0),
    ROW_COUNT                         NUMBER(38,0),
    "SIZE"                            NUMBER(38,0),
    OVER_ARCH_THRESOLD_FILE_COUNT     NUMBER(38,0),
    OVER_ARCH_THRESOLD_ROW_COUNT      NUMBER(38,0),
    OVER_ARCH_THRESOLD_SIZE           NUMBER(38,0)
) TABLESPACE "DATA";
