|
1 | 1 | # DHIS2 Version 41 Upgrade Notes
|
2 | 2 |
|
3 |
| - |
4 | 3 | Welcome to the upgrade notes for DHIS2 version 41.
|
5 | 4 |
|
6 | 5 | > **It is important to be familiar with the contents of these notes *before* attempting an upgrade.**
|
7 | 6 | >
|
8 |
| -> :warning: **Please ensure you have also read the upgrade notes from the [PREVIOUS RELEASE](../2.40/README.md), if upgrading from an earlier version** |
9 |
| -
|
| 7 | +> :warning: **Ensure you have also read the upgrade notes from the [PREVIOUS RELEASE](../2.40/README.md) if upgrading from an earlier version** |
10 | 8 |
|
11 | 9 | To help you navigate the document, here's a detailed table of contents.
|
12 | 10 |
|
@@ -39,7 +37,6 @@ To help you navigate the document, here's a detailed table of contents.
|
39 | 37 | - [Postgres Reference](#postgres-reference)
|
40 | 38 | - [Deprecations and Removals](#deprecations-and-removals)
|
41 | 39 |
|
42 |
| - |
43 | 40 | <!--
|
44 | 41 | 1. [Functional Changes](#functional-changes)
|
45 | 42 | 2. [Performance Enhancements](#performance-enhancements)
|
@@ -110,22 +107,21 @@ END;
|
110 | 107 | $$ LANGUAGE plpgsql STRICT;
|
111 | 108 |
|
112 | 109 | select uid,
|
113 |
| - valuetype, |
114 |
| - description, |
115 |
| - 'update trackedentityattribute set valuetype=''TEXT'' where uid = ''' || uid || ''';' as suggested_fix_statement |
| 110 | + valuetype, |
| 111 | + description, |
| 112 | + 'update trackedentityattribute set valuetype=''TEXT'' where uid = ''' || uid || ''';' as suggested_fix_statement |
116 | 113 | from (select tea.uid,
|
117 |
| - tea.valuetype, |
118 |
| - tea.description, |
119 |
| - teav.value, |
120 |
| - case |
121 |
| - when tea.valuetype in ('NUMBER', 'UNIT_INTERVAL', 'PERCENTAGE') then can_be_casted(teav.value, 'double precision') |
122 |
| - when tea.valuetype like '%INTEGER%' then can_be_casted(teav.value, 'integer') |
123 |
| - when tea.valuetype in ('DATE', 'DATETIME', 'AGE') then can_be_casted(teav.value, 'timestamp') |
124 |
| - end as safe_to_cast |
125 |
| - from trackedentityattribute tea |
126 |
| - join trackedentityattributevalue teav |
127 |
| - on tea.trackedentityattributeid = teav.trackedentityattributeid) as t1 |
128 |
| - where safe_to_cast = false |
| 114 | + tea.valuetype, |
| 115 | + tea.description, |
| 116 | + teav.value, |
| 117 | + case |
| 118 | + when tea.valuetype in ('NUMBER', 'UNIT_INTERVAL', 'PERCENTAGE') then can_be_casted(teav.value, 'double precision') |
| 119 | + when tea.valuetype like '%INTEGER%' then can_be_casted(teav.value, 'integer') |
| 120 | + when tea.valuetype in ('DATE', 'DATETIME', 'AGE') then can_be_casted(teav.value, 'timestamp') |
| 121 | + end as safe_to_cast |
| 122 | + from trackedentityattribute tea |
| 123 | + join trackedentityattributevalue teav on tea.trackedentityattributeid = teav.trackedentityattributeid) as t1 |
| 124 | +where safe_to_cast = false |
129 | 125 | group by uid, valuetype, description;
|
130 | 126 |
|
131 | 127 | DROP function if exists can_be_casted(s text, type text);
|
@@ -235,21 +231,20 @@ have been deprecated in favor of a `pager` object. Both the flat pagination fiel
|
235 | 231 | the nested `pager` are returned as of 2.41 if pagination is enabled. The flat fields will be removed
|
236 | 232 | in a future release.
|
237 | 233 |
|
238 |
| -> **Example** |
239 |
| -> ```json |
240 |
| -> { |
241 |
| -> "pager": { |
242 |
| -> "page": 3, |
243 |
| -> "pageSize": 2, |
244 |
| -> "total": 373570, |
245 |
| -> "pageCount": 186785, |
246 |
| -> }, |
247 |
| -> "page": 3, |
248 |
| -> "pageSize": 2, |
249 |
| -> "total": 373570, |
250 |
| -> "pageCount": 186785, |
251 |
| -> } |
252 |
| -> ``` |
| 234 | +```json |
| 235 | +{ |
| 236 | + "pager": { |
| 237 | + "page": 3, |
| 238 | + "pageSize": 2, |
| 239 | + "total": 373570, |
| 240 | + "pageCount": 186785, |
| 241 | + }, |
| 242 | + "page": 3, |
| 243 | + "pageSize": 2, |
| 244 | + "total": 373570, |
| 245 | + "pageCount": 186785, |
| 246 | +} |
| 247 | +``` |
253 | 248 |
|
254 | 249 | The actual data previously returned in `instances` is returned in a key named after the plural of
|
255 | 250 | the returned entity itself. For example `/tracker/trackedEntities` returns tracked entities in key
|
@@ -459,10 +454,10 @@ Therefore, no downtime is expected following the migrations.
|
459 | 454 | You can check that the index creation hasn't changed after the migration via the transaction commit.
|
460 | 455 |
|
461 | 456 | ```sql
|
462 |
| -SELECT pg_xact_commit_timestamp(xmin) |
463 |
| -FROM pg_class |
464 |
| -WHERE relname = 'programstageinstance_pkey'; |
| 457 | +select pg_xact_commit_timestamp(xmin) |
| 458 | +from pg_class |
| 459 | +where relname = 'programstageinstance_pkey'; |
465 | 460 | ```
|
466 |
| -Notice if you want to run the query, Postgres needs to start with `-c track_commit_timestamp=on` |
| 461 | +Note that if you want to run the query, Postgres needs to start with `-c track_commit_timestamp=on` |
467 | 462 |
|
468 | 463 | ## Deprecations and Removals
|
0 commit comments