Specialized Administration > Tailoring Business Objects > Type and Attribute Management > Type and Attribute Management Command-Line Tools > Adding Columns to Types > Example: Allocating Additional Columns for a Type
  
Example: Allocating Additional Columns for a Type
This example demonstrates how to add additional columns for a type. You would need to do this if no additional columns have yet been added for a type, or if all of the initially allocated columns for a given type are in use and additional columns are required. The example below adds five additional columns for a subset of the available data types (String, Long, Double) to the wt.part.WTPart type.
* 
For String data type attributes, if you need a data size larger than 500 (VARCHAR), then you need to add the -stringSize parameter to the AddColumns command. For more information, see Setting a Larger Database Column Size for String Local Attributes.
1. From a Windchill shell, run the following command (the expected console output is also shown):
D:\<Windchill>\AddColumns wt.part.WTPart String=5 Long=5 Double=5

Annotation processing round 1 complete -- 2 file(s) generated.
Annotation processing generation COMPLETE. ALL ERRORS BEYOND THIS POINT ARE REAL!!!
Attribute columns are added to wt.part.WTPart successfully.
Annotated source files: WTPartTypeInfo.java, WTPartTypeInterface.java are generated at
D:\Windchill_installation\Windchill\temp\src\wt\part.
Customer added columns report D:\Windchill\installer\ext\AddColumns.txt
is generated or updated.

Updating database schema... be patient.
2. The Upgrade Schema window displays.
The Upgrade Schema window disappears when the process is finished. Once the AddColumns tool is finished, the following artifacts are available:
The console shows the following message: Database schema is updated.
An upgrade_tool.log file is created in the directory from which the command was run.
The database schema for wt.part.WTPart is now updated to include five additional columns of each of the following data types: String, Long, and Double.
The WTPartTypeInfo.java and WTPartTypeInterface.java class files are generated at the location you specified on the above command line. The location for generated code is optional. If you don’t specify the location, the code is stored in the <Windchill>\temp\src directory. In this case, the default location is used.
3. Reboot the method server to make the newly added columns available for the type.