Exposing properties using the Modify Schema wizard
You can modify the PegaRULES database schema using the Modify Schema wizard. To make changes to the database schema, your connection to the PegaRULES database must have the ALTER TABLE and CREATE TABLE capabilities.
Before you begin: To use the Modify Schema Wizard and expose properties, your
access group must have the ViewAndOptimizeSchema privilege and the
dynamic system setting
database/AutoDBSchemaChanges
must be true.- Click Configure > System > Database > Modify Schema.
- Select the database that you want to view or modify and click Next. The databases listed have been defined through a Data-Admin-DB-Name data instance.
- Select the database table that you want to view or modify and click Next. The tables listed have been defined through a Data-Admin-DB-Table data instance.
-
The list shows which Pega Platform concrete classes are associated
with the selected database table and database. Click Set to be
visible. The display shows a list of properties marked
Required in the Column Inclusion field on
the Advanced tab on the property form.
The summary section at the top of the page displays the selected database name, the selected table, the schema name, the number of rows in the selected table, and the number of columns in the selected table.
The detail section displays the following information:
- Class name – Rule-Obj-Class name.
- RuleSet– The ruleset associated with the class.
- Set to be visible– The number of single value properties in the class that are marked as Required in the Column Inclusion field on the Advanced tab on the property form. The values in this field are informational only and do not affect database operation.
- Count – The number of properties in the class.
-
In the properties view, select the properties that you want to expose by clicking the
check box in front of the property. Only unexposed properties have a check box.
- Name – The property name, the second key part of the property.
- Type – The property type, such as Text, Identifier, DateTime, and so on.
- Class – The Applies To key part of the property.
- Class key? – Not used.
- Column Visibility – The value of the Column Inclusion field on the Advanced tab of the Property form, if the value is required or recommended. These values are advisory only.
- Name – The name of the database column. It can vary from the property name in case or format.
- Datatype – The column's database type.
- Size – The size of the column, in characters. The default width is 64 characters, or the maximum length of the property if defined for the property. If you change these values, update the Max Length values on the Property form if they have been defined.
- You can modify the column width of unexposed Text, Identifier, or Password type properties by changing the value in the Size column.
-
You can create the columns by directly updating the schema from this page or create the
columns by generating SQL to use later.
- Create columns now
- Click Generate Database Columns.
- Enter a database user ID and password that can modify this database's schema.
- Click Create Selected Columns. The new columns are added to the table and existing rows are resaved if requested.
- A confirmation message is displayed indicating that the new columns have been added to the table and existing rows have been resaved, if you have requested that existing rows be saved. New or updated rows can now assign values to the exposed properties.
- Create columns by using SQL
- Click Generate SQL Code.
- Click Generate SQL to create selected columns.
- When the SQL code is displayed, copy it into a text file for later use. Populate the columns after the schema change is complete.
Note: If a selected property has non-blank values in some rows in the Storage Stream (BLOB) column, copy the existing values into the new column by using the Column Populator utility. - Create columns now