Enabling custom tables for staging

If you have customized your database schema by creating new tables and you want to stage these custom tables, perform the following steps for each custom table you want to stage.

Procedure

  1. Identify the scope of the customized table:
    Site data
    The table records contain site changes. For example, new taxes or currencies.
    Merchant data
    The table records contain store changes. For example, the STORE and CATENTRY tables are merchant tables. Typically, when a store ID exists in the table, it is likely a merchant table.
    Mixed site and merchant data
    The table records contain both site and store changes. These hybrid tables are defined in the STGSITETAB table. For hybrid tables, one of the table columns is used to decide whether the record is SITE or MERCHANT. This table column can be defined in the COLNAME column of the STGMRSTTAB table. For example, the MEMBER table uses MEMBER_ID to decide if the record is SITE or MERCHANT.

    If your site is hosting several stores, you might be using one common staging server. Sometimes you might want to propagate only site changes such as when you are adding a new tax or a new currency. Identifying the scope of each customized table can help you in this task. You can decide at the record level if a table contains site, merchant or mixed data depending on the records in that table. For example, if all the records contain site changes, then the table is a site table. If some records contain store changes and some site changes, it is a mixed table.

  2. In both the staging server and the production server, insert the customized table into the STGSITETAB, STGMERTAB, or STGMRSTTAB table, depending on the scope of the table:
    • For site tables, insert only into STGSITETAB.
    • For merchant tables, insert only into STGMERTAB.
    • For tables which contain both site and merchant data, insert into STGSITETAB, STGMERTAB, and STGMRSTTAB.

    If you are inserting customized parent and child tables, ensure the TABNBR column value for the child tables are higher than the TABNBR column value for the parent tables. If your customized table is a parent table of a WebSphere Commerce table, ensure that the TABNBR column value for the customized table is lower than the TABNBR column value for the WebSphere Commerce table.

  3. On the staging server, create database triggers for the custom database table to record changes to the custom database table to the STAGLOG table.