omiebi
(Omiebi)
6 March 2023 14:36
1
Hello everyone, I am trying to upgrade my dhis2 instance from 2.30 - 2.31 and i’m experiencing some issues. here’s my instance details:
postgres: 10
tomcat 9
java 8
ubuntu 20.04
here is a link to the server logs :
didate
(Mamadou Lamarana)
6 March 2023 14:56
2
Hello
the script try to delete latitude column (from the programinstance table) as mentioned below. But you have SQL Views depending on this table.
As recommended in the link below, you have to delete all SQL Views
# DHIS 2.31 Upgrade Notes
## Upgrade
- In 2.31 we are introducing [Flyway](https://flywaydb.org/) as a new system for database migrations. In the process we have removed most of the legacy database migration statements/scripts in order to have a fresh start and to reduce 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.
- As always, remember to drop your SQL views before upgrading the DHIS 2 version. The database upgrade routines might change data types, which is not allowed by PostgreSQL if referred to from SQL views.
### Upgrade from 2.31.0 to a later patch
A bug was introduced in 2.31.0 which was corrected later in the 2.31.1 Flyway script. This leads to a checksum mismatch when upgrading from that earlier release.
You will need to **run the following SQL prior to upgrading from 2.31.0** to correct the checksum:
```
update flyway_schema_history set checksum = '-271885416' where version = '2.31.1';
```
This manual intervention is **not** required when upgrading directly from 2.30.
## Middleware
- PostgreSQL version **9.6** or higher is required. The minimum required version was previously 9.4. We recommend migrating straight to version 10 as it is well tested with DHIS 2 and contains several performance improvements over 9.x.
This file has been truncated. show original
1 Like
omiebi
(Omiebi)
6 March 2023 17:08
3
hello @didate thanks for the feedback, i tried to drop sql views and got a bunch of errors. Here’s one:
WARN 2023-03-06 17:05:23,105 Validation failed for SQL view ‘I4FJ0Pdo1w0’: SQL query contains references to protected tables (DefaultSqlViewService.java [taskScheduler-22])
didate
(Mamadou Lamarana)
6 March 2023 17:16
4
Did you use Data administration app → maintenance-> Drop SqlViews ?
omiebi
(Omiebi)
6 March 2023 17:19
5
@didate Yes I did, does deleting the sql views in Maintenance>others>sql views have the same effect?