]> git.koha-community.org Git - koha.git/commit
Bug 17914: Do not try and add the updated_on columns to the borrowers and deletedborr...
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 16 Jan 2017 10:51:01 +0000 (11:51 +0100)
committerKatrin Fischer <katrin.fischer.83@web.de>
Sun, 22 Jan 2017 16:53:10 +0000 (17:53 +0100)
commitca7d49e69b0aeaddb14b6b8bbf1695274c1ac670
treee65d8b11917ba24954eeeed04df647e469c35d67
parent87e3be143b99f7094848045b044ea7685605cf64
Bug 17914: Do not try and add the updated_on columns to the borrowers and deletedborrowers table

Bug 10459 has been backported and the DB entry (add borrowers.updated_on and
deletedborrower.updated_on) is now played in
  - 16.06.00.027
  - 16.05.00.002
  - 3.22.08.001

This will raise a MySQL warning if the column already exists.
  DBD::mysql::db do failed: Duplicate column name 'updated_on'

Since bug 17234 we have now a subroutine (C4::Installer::column_exists) to test
if a column exists.
When a DB entry modifying the DB structure is backported, it HAS TO check if the
column, constraint or table exists before executing the query.

Test plan:
git checkout 3.22.x (16.05.x or 16.11.x)
install Koha
git checkout master
execute the installer
=> Without this patch you will get a warning when adding borrowers.updated_on)
=> With this patch, you should not get it

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2b303129b82a5134f04c24907c05bf863603fef7)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
installer/data/mysql/updatedatabase.pl