Bug 17292 - Use of DBIx in updatedatabase.pl broke upgrade
commitfc42eeba6a66c02459332e257fdb1364fb257270
authorKyle M Hall <kyle@bywatersolutions.com>
Mon, 12 Sep 2016 14:20:19 +0000 (12 14:20 +0000)
committerFrédéric Demians <f.demians@tamil.fr>
Sat, 22 Oct 2016 08:28:49 +0000 (22 10:28 +0200)
tree480ecf93425580c2a89c9c8b4a93bf9ecbb06236
parent3c2bd4ef3b1cc45d955940c1323c2b2c9b05cc4a
Bug 17292 - Use of DBIx in updatedatabase.pl broke upgrade

A recent change in the 'subscription' table structure highlighted a
problem in a DBRev upgrade (3.23.00.006). As it adds a new column, when
upgrading from (say) 3.20.00.000 the code/schema (correctly) expects the
subscription.itemtype column to exist. But it is not created until DBRev
16.06.00.025.

To reproduce:
- Have a clean 3.20.00 DB loaded into kohadevbox
- Checkout current master
- Run:
  $ perl installer/data/mysql/updatedatabase.pl
  => FAIL: The upgrade procedure fails due to missing colum.

  The solution: rewrite the updatedatabase.pl entry using plain DBI

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f11f07a703eca7da2d32c105f8c9f4f46f940b6f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
installer/data/mysql/updatedatabase.pl