Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Records in policyadmin_schema_changelog = +109

Version in schema_versions: 0900

...

Records in policyadmin_schema_changelog = 109 +13=122

Version in schema_versions: 0800

...

Records in policyadmin_schema_changelog = 122 +13=135

Version in schema_versions: 0900

...

Rename backup_pdpstatistic table in policyadminschema:  RENAME TABLE backup_pdpstatistic pdpstatistics to pdpstatistics;

Modify db_migrator_policy_init.sh - Remove any lines referencing downgrade and add the 2 lines under "Upgrade scripts" 

...

Records in policyadmin_schema_changelog = 24 +11

Version in schema_versions: 0900

...

Ensure you are on release 0900. 

Rename pdpstatistics table in policyadmin schema:  RENAME TABLE pdpstatistics to backup_pdpstatisticsAdd timeStamp column to papdpstatistics_enginestats: ALTER TABLE jpapdpstatistics_enginestats ADD COLUMN timeStamp datetime DEFAULT NULL NULL AFTER UPTIME;

Modify db_migrator_policy_init.sh - Remove any lines referencing upgrade and add the 2 lines under "Downgrade scripts" 

...

This should result in an error (last row in policyadmin_schema_changelog will have a success value of 0)

Rename backup_pdpstatistic table in policyadminschema:  RENAME TABLE backup_pdpstatistic to pdpstatistics;Remove timeStamp column from papdpstatistics_enginestats: ALTER TABLE jpapdpstatistics_enginestats DROP COLUMN timeStamp;

The config job will retry 5 times. If you make your fix before this limit is reached you won't need to redeploy.

Redeploy to run downgrade

Number of files run = 129

Tables in policyadmin = 73

Records in policyadmin_schema_changelog = 36+9 (maybe more depending on the number retries)

Version in schema_versions: 0800

...

Modify db_migrator_policy_init.sh - Remove any lines referencing downgrade and add the 2 lines under "Upgrade scripts" 

Update pdpstatistics:  ALTER TABLE pdpstatistics ADD COLUMN POLICYUNDEPLOYCOUNT BIGINT DEFAULT NULL NULL AFTER POLICYEXECUTEDSUCCESSCOUNT;

Make/Redeploy to run upgradeOnce the db is running but before galera-config is run rename pdpstatistics table in policyadmin schema:  RENAME TABLE pdpstatistics to backup_pdpstatistics;

This should result in an error (last row in policyadmin_schema_changelog will have a success value of 0)

Rename backup_pdpstatistic table in policyadminschema:  RENAME TABLE backup_pdpstatistic to pdpstatisticsOnce the retry count has been reached, update pdpstatistics: ALTER TABLE pdpstatistics DROP COLUMN POLICYUNDEPLOYCOUNT;

Modify db_migrator_policy_init.sh - Remove any lines referencing upgrade and add the 2 lines under "Downgrade scripts" 

...

Records in policyadmin_schema_changelog = 39+3

Version in schema_versions: 0800

...

Modify db_migrator_policy_init.sh - Remove any lines referencing downgrade and add the 2 lines under "Upgrade scripts" 

Update PDP table:  ALTER TABLE pdp ADD COLUMN LASTUPDATE datetime NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER HEALTHY;

Make/Redeploy to run upgrade

...

This should result in an error (last row in policyadmin_schema_changelog will have a success value of 0)

Rename backup_pdpstatistic table in policyadminschema:  RENAME TABLE backup_pdpstatistic to pdpstatistics;Update PDP table:  ALTER TABLE pdp DROP COLUMN LASTUPDATE;

The config job will retry 5 times. If you make your fix before this limit is reached you won't need to redeploy.

Redeploy to run upgrade

Number of files run = 14

...

Records in policyadmin_schema_changelog = 53+14 (maybe more depending n the number of retries)

Version in schema_versions: 0900

...

Records in policyadmin_schema_changelog = 66+13

Version in schema_versions: 0800

...

Records in policyadmin_schema_changelog = 79+13

Version in schema_versions: 0900

...

Insert statements for pdpstatistics and jpapdpstatistics_enginestats: apex-pdpstatistics.sql


Demos (4, 5 and 9) without voice over

https://estab-my.sharepoint.com/:f:/g/personal/adheli_tavares_est_tech/EmOR4SaA1uJIjcvlqHW2QeoBmHsOfelczmKCavelCUw3Jg?e=bLY15S

Demos (8) with voice over

https://estab-my.sharepoint.com/:f:/g/personal/kevin_timoney_est_tech/EmY3gx5COF5GnZ02mmgAx3kBLal3c8xRmGtwleHYfRJebQ?e=fvlwMS