Knowing DHIS2 version number from the database

Hey there!

I’m managing multiple DHIS2 instances and I was curious to know - apart from recording which .war file was installed successfully during Tomcat startup, is there a way, directly from the database, to know which dhis2 version is running? Like a table that holds that info maybe?

Hi @lillian1n2
For identifying major versions it is easier. If you check the flyway_schema_history table, you can get an idea of which major version is currently installed. (2.42 or 2.41 or etc)
For example if you run select version from flyway_schema_history; you see the version of all the flyway migrations. If you check what is the latest version you would get a version that looks like 2.42.21 or 2.41.36 . From that you can decipher the major version atleast.

For patch version, i.e. to recognize if the deployed dhis2 version is a 2.41.6 or 2.41.8 patch war, it is not that straightforward. You will have to find the latest migration file version and cross check with source code on which was the latest version for each patch.

1 Like