Identify the DHIS2 version from database backup

I have a database backup I want to restore it but I don’t know the dhis2 version. Is there any table in the database which stores the DHIS2 version? or any a workaround for the issue?

Perhaps someone else can comment, but if it’s 2.31 or above, you should have the flyway_schema_history table, so:

select * from flyway_schema_history

should give you a clue about the major version. Older versions won’t have this table though.

thanks, @Edward_Robinson for the response.

I have queried the database and the below result returned. Ordered by “Installed On” descendingly does this mean the latest version on top?

Rather order by version - what is the highest version number listed there? From the snippet you’re showing, I’d suggest that’s a 2.33 database (which minor version, I’m not sure). Looking at the install notes for 2.33.6 (latest 2.33 minor release), you can use that database as-is with 2.33.6.



thank you @Edward_Robinson the first response helped to resolve.

1 Like