DHIS 2.20 Upgrade

SQL script to run against the database to perform necessary upgrades is found below.

2.20 upgrade SQL script

The following Web API changes are introduced:

  • For meta-data filters, the default logical operator for multiple filters is AND. This used to be OR.
  • The resource on /api/trackedEntityInstances is now returning full objects. The existing resource which returns a grid-based response has been moved to /api/trackedEntityInstances/grid.
  • The "type" property of program object with numeric values is replaced by a "programType" property with valid options "WITH_REGISTRATION", "WITHOUT_REGISTRATION".
  • All endpoints now use a common "web message" response format which provides "status", "code", httpStatus", "message", "devMessage" properties in JSON format.
  • The enrollments resource now uses paging of objects in the response.
  • The userSettings resource now respects the "Accept" header in terms of the content type used for the response. Previously only JSON was used as content type.

The following database changes are introduced:

  • Tables "reporttable" and "chart" have a new column "programid" with foreign key to table "program".
  • New tables "programrule", "programruleaction", "programrulevariable" have been introduced.
  • Table "programindicator" has a new column "filter".
  • Table "constant" has new columns "code", "shortname", "description".
  • Table "organisationunit" has a new column "path".