Ant target: CM_updateWorkspacesTable
Use the update workspaces table script when we make schema changes to a table and need to update your workspaces schema to include the changes.
Usage
- (Linux)
utilities_root/bin/config_ant.sh -buildfile utilities_root/components/Workspaces/xml/updateWorkspacesSchemaTable.xml -DinstanceName=instance_name -DtableName=tableName -DdbaPassword=administrative_password -DtableResourceType=tableResourceType(optional) -DresourceXMLLocation=location_of_resource_XML_Files(optional) -DgenerateSQLStatementsOnly=true|false(optional) -DgenerateSQLStatementsOutputFile=outputFileDirectory(optional) -DdebugMode=true(optional) CM_updateWorkspacesTable -logfile location_of_log_file (optional)
Notes:
- This text is wrapped for display purposes. Enter the command on one line.
(Developer) To run the update workspaces table utility in a WebSphere Commerce Developer environment, see Running authoring environment update scripts
Parameters
- instance_name
- The WebSphere Commerce instance name.
- resourceXMLLocation
- This parameter is the XML directory where the content-management/wc-resource-containers.xml and all the other resource manager XML files reside. This directory needs to contain only 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 utility 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. The utility looks for the directory named "content-management" under the specified location first. If the utility cannot find the content-management directory under the specified location, it tries to locate the content-management directory under the utility classpath. If the utility 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 we want to update.
- tableResourceType
- The table resource type. The valid input for this parameter can be CONTENT_MANAGED, OPERATIONAL, and NON_MANAGED. If any of these values are specified, the utility uses that value as the resource type for the table. The utility does not look up the resource type from the resource XML location files. This parameter supersedes the resourceXMLLocation parameter. If both parameters are included when you run the utility script, the utility uses the specified tableResourceType type. If you use this parameter, ensure that you sync the resource XML files in sync with the value that you specify for this parameter.
Note: If both resourceXMLLocation and tableResourceType are not specified, and the content-management directory cannot be found under the utility classpath, the utility 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.
- dbaPassword
- The password for the database administrative user. This password is needed for schema creation and update.
- generateSQLStatementsOnly
- Optional. A flag that indicates whether the Ant task updates workspaces or only generates the SQL to use to update workspaces. We can set the following values for this parameter:
- true
- The utility only reports the SQL that for updating workspace pool.
- false
- The utility updates the workspace pool. This value is the default value.
- generateSQLStatementsOutputFile
- 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 file: utilities_root/logs/Application.messages.log.
- logfile
- Optional. If provided, the Ant script creates or overwrites a log file at this location. If not specified, the logging information is displayed in the console.
Example
The following example displays the config_ant task that we can run to create a table called MYTABLE and is content-managed:
cd utilities_root/bin ./config_ant.sh -buildfile ../components/Workspaces/xml/updateWorkspacesSchemaTable.xml -DinstanceName=scott -DtableName=MYTABLE -DdbaPassword=administrative_password -DtableResourceType=CONTENT_MANAGED CM_updateWorkspacesTable -logfile utilities_root/logs/MYTABLE_UpdateWorkspaces.log
Note: This text is wrapped for display purposes. Enter the command on one line.
Related concepts
Authoring environment schema update tool
Related tasks
Enable Workspaces
Creating an authoring environment
Synchronizing an authoring environment with a production environment
Running the authoring environment update scripts on the WebSphere Commerce Server
Updating the quick publish target
Updating the JDBC provider setting for the quick publish target
Enable retry for quick publish
Enable e-mail notification for workspaces
Enable shopping flow preview for workspaces
Changing workspaces locking policy
Related reference
Ant target: CM_updateWorkspacesSchema
Troubleshooting: Update Workspace failing to update the workspace because of missing column for primary key