Sequence of Scripts Execution
When the Model Upload is performed with the option Update the Database
Schema with Model changes as No
or <runscriptsFlag>
is set as FALSE, you must execute
the SQL scripts generated as part of the OFSAAI Model Upload process in the
exact sequence, in order to make the Infodom Schema to be consistent with
the JSON files persisted in the database.
The sequence is explained in the following table:
Table 6-3 Sequence of Scripts Execution
Action | Folder Name | Rollback Folder Name |
---|---|---|
Drop indexes | droppedindex | r_droppedindex |
Drop foreign keys | alterdropfkey | r_ alterdropfkey |
Drop primary keys | droppkey | r_droppkey |
Drop tables | dropoldtable | r_dropoldtable |
Create new tables | newtables | Droptable |
Alter columns | altercolumn | r_altercolumn |
Add primary keys | addpkey | r_addpkey |
Add foreign keys | addfkey | r_addfkey |
Add foreign keys for new tables | newfkeys | dropfkey |
Create indexes | createdindexes | r_createdindexes |
Note:
The folders are available atftpshare/<INFODOM>/json/scripts/altertable
location.
Roll back scripts must be executed in case of failures in the reverse order. That is, if the 4th step has caused roll back, then roll back scripts from 4 to 1 must be executed in sequence. Rollback scripts are available in the same path with the file name prefixed with r_.