MantisBT: master 412f855f

Author Committer Branch Timestamp Parent
dregad dregad master 2020-01-06 09:54:18 master 8975002d
Affected Issues  0026568: Use appropriate statement to update DB schema when generating SQL

Use UPDATE/INSERT to update DB schema

When the installer is used to generate SQL instead of directly creating
the database, the last statement printed was a hardcoded INSERT to
create the database_version key in the config table.

This did not consider the case of an upgrade, where the record already
exists, so running the script as-is caused a duplicate key SQL error.

Since the installer knows whether it is installing a new database or
upgrading an existing one, an UPDATE statement should be generated
instead in the latter case.

Fixes 0026568

mod - admin/install.php Diff File