WebSphere Commerce EnterpriseWebSphere Commerce Professional

Updating the workspaces write schema

In this lesson, you run the UpdateWorkspaceSchema script to create your custom tables in all of your workspaces. If you change to your WebSphere Commerce database schema, such as adding a new table, these changes must also be made in the workspace schemas. This tool allows you to recalibrate the workspace schemas with the master database schema. Without recalibration, your workspaces will not work with your new changes to the base schema.

Procedure

  1. Stop your WebSphere Commerce Server.
  2. From command line, Run ANT target: UpdateWorkspacesSchema to create the necessary tables and views in the workspaces for the tables you have configured.
    WCDE_installdir\bin\updateWorkspacesSchema.bat 
    You should see the following message:
    Updating schema was successful
  3. Connect to your development database, and run the following SQL query:
    select * from wcw101.XWARRANTY;
    You should get zero rows returned, but the empty table should have the following columns:
    CATENTRY_ID WARTERM WARTYPE CONTENT_STATUS CONTENT_TASKGRP OPTCOUNTER CONTENT_TASK

What to do next

Register the change control insert more command for the custom access profiles. The InsertMoreNounChangeControlMetaDataCmdImpl looks up the locking information for a noun and adds the locking information to the response. Locking information is used by Management Center to flag objects as read-only or not read-only. Since the previous tutorial Tutorial: Adding fields in the Catalogs tool customized the Catalogs tool to use custom access profiles, the InsertMoreNounChangeControlMetaDataCmdImpl must be registered to return locking information.

  • Run the following SQL query:
    insert into cmdreg (storeent_id, interfacename, classname) values (0,  'com.ibm.commerce.catalog.facade.server.commands.InsertMoreCatalogEntryDataCmd+MyCompany_All.0', 'com.ibm.commerce.foundation.server.command.bod.bom.InsertMoreNounChangeControlMetaDataCmdImpl');