User Tools

Site Tools


Writing /app/www/public/data/meta/development/general.meta failed
development:general

General Guidelines

SQL Upgrade and Rollback Scripts

To ensure extra smoothness of the releases, the domain-related changes to the database (any application) must be accompanied by the relevant UPGRADE and ROLLBACK scripts.

These scripts can be found in the idms-sql-script repository in the upgrade directory under the relevant release (e.g. 3.2.5 (patches included)) folder.

Please do not forget to include the database-change-related ticket number as a comment in the UPGRADE and ROLLBACK scripts and in the GIT commit.

Example: You have added the abbreviation String field to the state entity in the SnmpManager in the REL-3.3.7. Following steps:

  1. clone or pull the idms-sql-script repository
  2. cd to the upgrade folder
  3. cd to the 3.3.7 folder (the relevant release folder) (create one if it does not exist)
  4. cd to the snmp_manager folder (create one if it does not exist)
  5. open the file with the name similar to 1-1.SnmpManager_3_3_0_upgrade.sql (create one if it does not exist)
  6. in it, add the comment stating the related changes ticket number
  7. in it, add the following line modifying the state table to add the abbreviation varchar column: ALTER TABLE state ADD COLUMN abbreviation VARCHAR(255) NULL AFTER region_id, ADD UNIQUE INDEX abbreviation_UNIQUE (abbreviation ASC);
  8. commit
  9. push

The steps for the ROLLBACK script are similar, with the only difference being the changed scripts and the column being dropped instead of created.

development/general.txt · Last modified: 2021/06/25 10:09 (external edit)