ANT task: UpdateWorkspacesSchemaTable

Use the UpdateWorkspacesSchemaTable Ant script when you have made schema changes to a table and need the workspaces schema updated to reflect that change.

 

Usage

This text is wrapped for display purposes. Enter the command on one line.

 

Parameters

instance

The WebSphere Commerce instance name.

resourceXMLLocation

This is the XML directory where the content-management/wc-resource-containers.xml and all the other resource manager XML files reside. This directory only needs to contain the resource manager XML file for this table if the table is content managed or operational. If there is no resource file for a table found in the content-management directory under the specified location, the tool assumes that there is no change to the resource type of the table, or the table is a non-managed type table if the table does not exist in the workspace yet. The tool looks for the a directory named "content-management" under the specified location first. If the tool cannot find the content-management directory under the specified location, it tries to locate the content-management directory under the tools classpath. If the tool still cannot find any content-management directory, it throws an exception. In summary, the content-management directory must exist even if it is empty.

tableName

The name of the table you want to update.

tableResourceType

The table desired resource type. The valid input for this can be CONTENT_MANAGED, OPERATIONAL, and NON_MANAGED. If any of the above specified for this parameter, the tool will use this as the desired resource type of the table instead of looking up the resource type from the resource xml files. This parameter supersedes the resourceXMLLocation parameter which means the tool will use the type specified here instead of looking up the type from the xml file if both of the parameters exists. If you use this parameter, make sure you have the resource XML files in sync with what you specify here.

If both resourceXMLLocation and tableResourceType are not specified, and the content-management directory cannot be found under the tool's classpath, the tool assumes that there is no change to the resource type of the table or the table is a non-managed type table if the table does not exist in the workspace yet.

generateSQLStatementsOnly (optional)

A flag (true or false) to indicate that the Ant task should not actually update the workspaces but rather just report the SQL used to update the workspace pool. The default value is false, which means that the workspace pool will be updated.

generateSQLStatementsOutputFile (optional)

The output file to print the SQL statements to if generateSQLStatementsOnly is set to true. If not specified then the SQL is output to standard output stream.

debugMode (optional)

If true, trace and log information is enabled and prints to the WC_installdir/logs/Application.messages.log file.

 

Example

The following example displays the config_ant task you would run when you create a new table called MYTABLE, that you want to be content managed:

cd WC_installDir/bin
./config_ant.sh -buildfile ../components/Workspaces/xml/updateWorkspacesSchemaTable.xml
-DinstanceName=scott -DtableName=MYTABLE 
-DtableResourceType=CONTENT_MANAGED CM_updateWorks

This text is wrapped for display purposes. Enter the command on one line.


Related Concepts


Authoring server schema update tool

Related tasks

Run the authoring server update scripts on the WebSphere Commerce Server


Related Reference


ANT task: UpdateWorkspacesSchema