Modify the structure of custom tables and data structures
- Last UpdatedApr 24, 2025
- 1 minute read
Occasionally, you may need to modify tables or data structures that are themselves custom tables or data structures.
A typical scenario might run as follows:
The AVEVA Practice team provides you with the custom table "audit", which is defined in the audit.json file. The audit.json file would reside in the %DNADataRoot%\RealTime\database\schema\tables directory. You decide to make use of this table, but you need to add an additional field—one that was not included as part of the original audit.json definition file.
To add an additional field to the custom table, you must create a new file in either the same directory as the existing audit.json file or in the developer workspace. The name of this new file, which would include the required field modifications, must be alphabetically greater than the name of the file containing the definition that you want to modify. For example, the title of the file audit.modifications.json is alphabetically greater than the title of the audit.json file. When you execute the Schema Convert (SchemaConverter), the system first processes the audit.json file, followed next by the audit.modifications.json file, resulting in the desired database structure.
If you incorrectly name the modification file (that is, name it such that it's ordered alphabetically prior to the structure you want to modify), then the definition of the original file will overwrite the changes of the modification file when processed by SchemaConverter.