View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 0026568 | mantisbt | installation | public | 2020-01-06 09:12 | 2020-03-15 15:23 | 
| Reporter | dregad | Assigned To | dregad | ||
| Priority | normal | Severity | minor | Reproducibility | always | 
| Status | closed | Resolution | fixed | ||
| Target Version | 2.24.0 | Fixed in Version | 2.24.0 | ||
| Summary | 0026568: Use appropriate statement to update DB schema when generating SQL | ||||
| Description | When the installer is used to generate SQL instead of directly creating the database, the last statement printed is a hardcoded INSERT to create the database_version key in the config table. This does not consider the case of an upgrade, where the record already exists, so running the script as-is triggers an SQL error, e.g.: 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. | ||||
| Tags | No tags attached. | ||||
| MantisBT: master 412f855f 2020-01-06 04:54 Details Diff | 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 | Affected Issues 0026568 | |
| mod - admin/install.php | Diff File | ||
