# =========================================
#    $Revision: #2 $
#    $Change: 9486 $
# =========================================


# ============================================================
#    Data warehouse v11:
# ============================================================

    Fix PFX_CALC_CPU_TIME to properly support resetting of job/subjob/work
    timestart values when work or subjobs are retried.


# ============================================================
#    Data warehouse v10:
# ============================================================
    
    Add error handler for MySQL error code 1146: "Table 'x' doesn't exist" to
    stored procedures PFX_CALC_CPU_TIME and PFX_CALC_AVG_WORK_TIME.


# ============================================================
#    Data warehouse v9:
# ============================================================

    Add the global resource fact and dimension tables creation got missed in v8
    create_db; tables don't get created during install of new DB',s only on
    upgrade.

    Rename the global resource fact table to not be camel-case causes errors in
    stored procedures on OSX.


# ============================================================
#    Data warehouse v8:
# ============================================================
    
    Add the global resource fact and dimension tables, support tracking of
    licenses and global resources.


# ============================================================
#    Data warehouse v7:
# ============================================================
    
    Grant the pfx_dw user all rights to the pfx_stats DB.


# ============================================================
#    Data warehouse v6:
# ============================================================
    
    Add a job status column to the job_fact to store the terminal state of the job.  

    Create stored procedures to extract data from fact tables based on an
    interval like "last 7 days" and store it in another table.


# ============================================================
#    Data warehouse v5:
# ============================================================
    
    The job_fact table now has an external dependency on the pfx_stats.memusage
    table during the regular data load cycle, so we'll ensure that we create an
    empty pfx_stats.memusage table as a placeholder.
    ( Duplicate of change in v4 - got missed during a release cycle )

    Create a new pfx_stats.tableversion table if it doesn't exist.  Preserve the
    current version if it does already exist, otherwise initialize it to version 0.

    Add a 'stats_user' with full rights to pfx_stats.*, read-only everywhere
    else.


# ============================================================
#    Data warehouse v4:
# ============================================================
    
    The job_fact table now has an external dependency on the pfx_stats.memusage
    table during the regular data load cycle, so we'll ensure that we create an
    empty pfx_stats.memusage table as a placeholder.
    ( Duplicated change in v5 - got missed during a release cycle )


# ============================================================
#    Data warehouse v3:
# ============================================================

    Rename table jobtime_fact to job_fact; we're going to be storing more than
    just time data in this table going forward.

    Fix stored procedures PFX_CALC_AVG_WORK_TIME and PFX_CALC_CPU_TIME to only
    include subjobs or agenda items that have completed.


# ============================================================
#    Data warehouse v2:
# ============================================================

    No changes or fixes other than implementing a table version tracking scheme.

