Skip to content

Commit

Permalink
Merge pull request #208 from dhis2/37-upgrdade-notes
Browse files Browse the repository at this point in the history
docs: (2.37) Added upgrade notes to fix sms-code migration issue.
  • Loading branch information
Philip-Larsen-Donnelly authored Jan 8, 2025
2 parents dd1170c + 71875fa commit 3745920
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions releases/2.37/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,19 @@ DROP TABLE IF EXISTS dashboarditem_charts CASCADE;
```

Assuming the statements are successfully executed you will be able to try the upgrade again.

## SMS Codes
During the upgrade process, the migration related to SMS codes might fail depending upon if database has invalid categoryoptioncomboid or not. The migration in question is named V2_37_46__Add_coc_fk_in_smscode.sql. If this occurs, you can resolve it using the SQL script provided below. More details can be found at https://dhis2.atlassian.net/browse/DHIS2-15169.

After applying the script, retry the upgrade process. This should resolve the issue and allow the upgrade to complete successfully.

Note: Please ensure you have a proper backup before executing any SQL scripts during the upgrade.

```
-- Set invalid cat option combos to default
update smscodes set optionid = (
select categoryoptioncomboid from categoryoptioncombo where name = 'default')
where optionid not in (
select distinct categoryoptioncomboid from categoryoptioncombo)
or optionid is null;
```

0 comments on commit 3745920

Please sign in to comment.