Adding columns to a Private Cloud database
There are limits on the number of fields you can create per object definition. For instance,
you cannot create more than 50 fields of Date or
Date/Time type. Platform uses the single wide database table,
RB_OBJ_DATA
, to store all object records. That table has 50 columns of
DATETIME type (in MySQL terms) named from DATE0 to
DATE49. When a new field is created, one of these columns is assigned to
that field to store data. If you are a Private Cloud customer and have full control over your
database, you can increase limits on the number of fields.
To add columns:
- Use an SQL script to create more columns of the selected type to the following tables:
RB_OBJ_DATA
(main data table)RB_DELETED_OBJS
(records in Recycle Bin)RB_USER_DATA
(Platform users)RB_CUST_DATA
(customers)
- Make sure that the newly added columns follow the naming convention and use continuous numbering.
For instance, you may create ten new Date/Time columns named
DATE50
,
toDATE51
DATE59
- Make sure these new columns are added to all databases.
- Add entries to
Shared Properties
to reflect the new limits on number of columns.
Property | Description | Default Value |
---|---|---|
MaxStrFields
|
Maximum number of VARCHAR(100) fields (in MySQL notation) | 200
|
MaxIntgFields
|
Maximum number of BIGINT fields | 150
|
MaxDblFields
|
Maximum number of DECIMAL(20,8) fields | 50
|
MaxTxtFields
|
Maximum number of LONGTEXT fields | 50
|
MaxDateFields
|
Maximum number of DATETIME fields | 50
|
After server restart, you should be able to create more Date or Date/Time type fields per object definition.
If system admin had configured extra fields via shared props : MaxIntgFields
(5 such prop) etc
Master Administrator is responsible for adding these new fields into all existing data tables in each of the database.
Data Tables : RB_CUST_DATA, RB_USER_DATA, RB_DELETED_OBJS, RB_OBJ_DATA, RB_OBJ_DATA_xxxx (if available),
Stored Procedure :
createDedicatedTableWithIndexes