Date: Fri, 29 Mar 2024 13:19:46 +0000 (UTC) Message-ID: <1145622309.3.1711718386904@1f45a0e00042> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2_1428825211.1711718386904" ------=_Part_2_1428825211.1711718386904 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The upgrade script (e.g. `/updates/upgrade.php`) has two main purposes:<= /p>
1) alter the database structure to match = the new code
2) alter/add settings into `/config/confi= g.inc.php` or to the config database table.
Sometimes the upgrade script may be used to 'fix' content that is wrong = in the database due to a historic bug. Institution specifc data issues shou= ld never be fixed via this script. The institution should write their own p= atch.
The overall principle of the upgrade script is to take any sub-version o= f Rogo (where possible) and upgrade to the latest. To do this it will activ= ely look at the database and configuration file and determine what changes = are necessary. This allows for the script to be safely run more than once a= nd not get too many fields add to the database.
record_updat=
e
and has_updated
can be used to record =
and check whether an update has been done respectively.pdaterttils::chec=
k_version
function should be added to each update script. It checks =
the version of rogo in config/rogo.xml
against the current ins=
talled version. This stops upgrade scripts being run more that once on a ve=
rsion and also stops upgrades being run when they are not required.