In 2.31 we are introducing Flyway as a new system for database migrations. In the process we have removed most of the legacy database migration scripts in order to have a fresh start and to reduce the startup time of the application.
As a result, when migrating from older DHIS 2 versions it is required to install DHIS 2.30 before installing DHIS 2.31. This will ensure that older migration scripts are being executed.
Also note that in 2.31 we require PostgreSQL 9.6 or higher as database management system.
Read the full upgrade notes here.