summaryrefslogtreecommitdiffstats
path: root/docs/development/devtools
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2022-03-30 16:39:48 +0100
committerAdheli Tavares <adheli.tavares@est.tech>2022-03-31 09:34:42 +0000
commitf6fb779120d17476cd811198ecacbcf4c4151c04 (patch)
tree086e1115e3a137c35d2f3fbf1f1f4cc82d09062b /docs/development/devtools
parent178dea1eb3eb979994d8b99f317f536b85435b60 (diff)
Updating db-migrator smoke test description
Issue-ID: POLICY-3999 Change-Id: I82e91b748c36489afc22888a4ca51daee59e2712 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'docs/development/devtools')
-rw-r--r--docs/development/devtools/db-migrator-smoke.rst23
1 files changed, 16 insertions, 7 deletions
diff --git a/docs/development/devtools/db-migrator-smoke.rst b/docs/development/devtools/db-migrator-smoke.rst
index 4aa41e46..54673779 100644
--- a/docs/development/devtools/db-migrator-smoke.rst
+++ b/docs/development/devtools/db-migrator-smoke.rst
@@ -15,8 +15,10 @@ Check number of files in each release
ls 0800/upgrade/*.sql | wc -l = 96
ls 0900/upgrade/*.sql | wc -l = 13
+ ls 1000/upgrade/*.sql | wc -l = 9
ls 0800/downgrade/*.sql | wc -l = 96
ls 0900/downgrade/*.sql | wc -l = 13
+ ls 1000/downgrade/*.sql | wc -l = 9
Upgrade scripts
===============
@@ -25,7 +27,9 @@ Upgrade scripts
:number-lines:
/opt/app/policy/bin/prepare_upgrade.sh policyadmin
- /opt/app/policy/bin/db-migrator -s policyadmin -o upgrade
+ /opt/app/policy/bin/db-migrator -s policyadmin -o upgrade # upgrade to Jakarta version (latest)
+ /opt/app/policy/bin/db-migrator -s policyadmin -o upgrade -t 0900 # upgrade to Istanbul
+ /opt/app/policy/bin/db-migrator -s policyadmin -o upgrade -t 0800 # upgrade to Honolulu
.. note::
You can also run db-migrator upgrade with the -t and -f options
@@ -37,7 +41,9 @@ Downgrade scripts
:number-lines:
/opt/app/policy/bin/prepare_downgrade.sh policyadmin
- /opt/app/policy/bin/db-migrator -s policyadmin -o downgrade -f 0900 -t 0800
+ /opt/app/policy/bin/db-migrator -s policyadmin -o downgrade -t 0900 # downgrade to Istanbul
+ /opt/app/policy/bin/db-migrator -s policyadmin -o downgrade -t 0800 # downgrade to Honolulu
+ /opt/app/policy/bin/db-migrator -s policyadmin -o downgrade -t 0 # delete all tables
Db migrator initialization script
=================================
@@ -56,18 +62,18 @@ Every time you modify db_migrator_policy_init.sh you will have to undeploy, make
:header-rows: 0
* - Number of files run
- - 109
+ - 118
* - Tables in policyadmin
- - 75
+ - 70
* - Records Added
- - 109
+ - 118
* - schema_version
- - 0900
+ - 1000
2. Downgrade to Honolulu (0800)
*******************************
-Modify db_migrator_policy_init.sh - remove any lines referencing upgrade and add the 2 lines under "Downgrade scripts"
+Modify db_migrator_policy_init.sh - remove any lines referencing upgrade and add the 2 lines under "Downgrade scripts" tagged as Honolulu
Make/Redeploy to run downgrade.
@@ -410,4 +416,7 @@ Check the pdp table to ensure the LASTUPDATE column has been added and the value
.. note::
The number of records added may vary depnding on the number of retries.
+With addition of Postgres support to db-migrator, these tests can be also performed on a Postgres version of database.
+In addition, scripts running the aforementioned scenarios can be found under `smoke-tests` folder on db-migrator code base.
+
End of Document