Skip to content

Commit

Permalink
chore: Improve formatting in upgrade notes
Browse files Browse the repository at this point in the history
  • Loading branch information
larshelge committed Nov 10, 2024
1 parent b19cd9a commit 810ffe6
Showing 1 changed file with 33 additions and 38 deletions.
71 changes: 33 additions & 38 deletions releases/2.41/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# DHIS2 Version 41 Upgrade Notes


Welcome to the upgrade notes for DHIS2 version 41.

> **It is important to be familiar with the contents of these notes *before* attempting an upgrade.**
>
> :warning: **Please ensure you have also read the upgrade notes from the [PREVIOUS RELEASE](../2.40/README.md), if upgrading from an earlier version**
> :warning: **Ensure you have also read the upgrade notes from the [PREVIOUS RELEASE](../2.40/README.md) if upgrading from an earlier version**
To help you navigate the document, here's a detailed table of contents.

Expand Down Expand Up @@ -39,7 +37,6 @@ To help you navigate the document, here's a detailed table of contents.
- [Postgres Reference](#postgres-reference)
- [Deprecations and Removals](#deprecations-and-removals)


<!--
1. [Functional Changes](#functional-changes)
2. [Performance Enhancements](#performance-enhancements)
Expand Down Expand Up @@ -110,22 +107,21 @@ END;
$$ LANGUAGE plpgsql STRICT;

select uid,
valuetype,
description,
'update trackedentityattribute set valuetype=''TEXT'' where uid = ''' || uid || ''';' as suggested_fix_statement
valuetype,
description,
'update trackedentityattribute set valuetype=''TEXT'' where uid = ''' || uid || ''';' as suggested_fix_statement
from (select tea.uid,
tea.valuetype,
tea.description,
teav.value,
case
when tea.valuetype in ('NUMBER', 'UNIT_INTERVAL', 'PERCENTAGE') then can_be_casted(teav.value, 'double precision')
when tea.valuetype like '%INTEGER%' then can_be_casted(teav.value, 'integer')
when tea.valuetype in ('DATE', 'DATETIME', 'AGE') then can_be_casted(teav.value, 'timestamp')
end as safe_to_cast
from trackedentityattribute tea
join trackedentityattributevalue teav
on tea.trackedentityattributeid = teav.trackedentityattributeid) as t1
where safe_to_cast = false
tea.valuetype,
tea.description,
teav.value,
case
when tea.valuetype in ('NUMBER', 'UNIT_INTERVAL', 'PERCENTAGE') then can_be_casted(teav.value, 'double precision')
when tea.valuetype like '%INTEGER%' then can_be_casted(teav.value, 'integer')
when tea.valuetype in ('DATE', 'DATETIME', 'AGE') then can_be_casted(teav.value, 'timestamp')
end as safe_to_cast
from trackedentityattribute tea
join trackedentityattributevalue teav on tea.trackedentityattributeid = teav.trackedentityattributeid) as t1
where safe_to_cast = false
group by uid, valuetype, description;

DROP function if exists can_be_casted(s text, type text);
Expand Down Expand Up @@ -235,21 +231,20 @@ have been deprecated in favor of a `pager` object. Both the flat pagination fiel
the nested `pager` are returned as of 2.41 if pagination is enabled. The flat fields will be removed
in a future release.

> **Example**
> ```json
> {
> "pager": {
> "page": 3,
> "pageSize": 2,
> "total": 373570,
> "pageCount": 186785,
> },
> "page": 3,
> "pageSize": 2,
> "total": 373570,
> "pageCount": 186785,
> }
> ```
```json
{
"pager": {
"page": 3,
"pageSize": 2,
"total": 373570,
"pageCount": 186785,
},
"page": 3,
"pageSize": 2,
"total": 373570,
"pageCount": 186785,
}
```

The actual data previously returned in `instances` is returned in a key named after the plural of
the returned entity itself. For example `/tracker/trackedEntities` returns tracked entities in key
Expand Down Expand Up @@ -459,10 +454,10 @@ Therefore, no downtime is expected following the migrations.
You can check that the index creation hasn't changed after the migration via the transaction commit.

```sql
SELECT pg_xact_commit_timestamp(xmin)
FROM pg_class
WHERE relname = 'programstageinstance_pkey';
select pg_xact_commit_timestamp(xmin)
from pg_class
where relname = 'programstageinstance_pkey';
```
Notice if you want to run the query, Postgres needs to start with `-c track_commit_timestamp=on`
Note that if you want to run the query, Postgres needs to start with `-c track_commit_timestamp=on`

## Deprecations and Removals

0 comments on commit 810ffe6

Please sign in to comment.