in case you already haven’t noticed: Tran has made a script for upgrading MySQL DHIS databases from version 2.2 to 2.3.
It is important that you back up your production databases before applying this script as there might be minor differences due to what modules you have been running.
The script will remove foreign key references to the source table, make the organisationunit id column auto-increment and then remove the source table.
Just wanted again to emphasize Caveman’s tip that appending “-f” is necessary here which forces the script to continue even if a single command fails. This might well happen since the script also cleans up some outdated tables from earlier releases which might not exist in your database:
mysql database_name -u user -p < dhis-upgrade-2.3.sql -f