Bug 23265 - Update to DB revision 16.12.00.032 fails: Unknown column 'me.item_level_hold'
Summary: Update to DB revision 16.12.00.032 fails: Unknown column 'me.item_level_hold'
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: master
Hardware: All All
: P5 - low blocker (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
: 23267 (view as bug list)
Depends on: 12063
Blocks: 19789 23809
  Show dependency treegraph
 
Reported: 2019-07-04 10:13 UTC by Mirko Tietgen
Modified: 2019-10-14 09:01 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.04, 18.11.10


Attachments
Bug 23265: (bug 12063 follow-up) Remove Koha::Holds from updatedatabase (2.96 KB, patch)
2019-08-06 14:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23265: (bug 12063 follow-up) Remove Koha::Holds from updatedatabase (3.02 KB, patch)
2019-09-03 15:31 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 23265: (bug 12063 follow-up) Remove Koha::Holds from updatedatabase (3.12 KB, patch)
2019-09-06 05:42 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mirko Tietgen 2019-07-04 10:13:37 UTC
When creating an instance from an older DB and running koha-upgrade-schema, the following error occurs.

>[…]
>Upgrade to 16.12.00.030 done (Bug 16344 - Add a circ rule to limit the auto renewals given a specific date)
>Upgrade to 16.12.00.031 done (Bug 15108: OAI-PMH provider improvements)
>DBD::mysql::st execute failed: Unknown column 'me.item_level_hold' in 'field list' [for Statement "SELECT `me`.`reserve_id`, `me`.`borrowernumber`, `me`.`reservedate`, `me`.`biblionumber`, `me`.`branchcode`, `me`.`notificationdate`, `me`.`reminderdate`, `me`.`cancellationdate`, `me`.`reservenotes`, `me`.`priority`, `me`.`found`, `me`.`timestamp`, `me`.`itemnumber`, `me`.`waitingdate`, `me`.`expirationdate`, `me`.`lowestPriority`, `me`.`suspend`, `me`.`suspend_until`, `me`.`itemtype`, `me`.`item_level_hold` FROM `reserves` `me` WHERE ( ( `found` = ? AND `priority` = ? ) )" with ParamValues: 0='W', 1=0] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.
>DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'me.item_level_hold' in 'field list' at /usr/share/koha/lib/Koha/Objects.pm line 209
Comment 1 Katrin Fischer 2019-07-05 06:07:05 UTC
Please link the bugs in cases like this - I didn't find this one :)
Closing my duplicate.
Comment 2 Katrin Fischer 2019-07-05 06:07:32 UTC
*** Bug 23267 has been marked as a duplicate of this bug. ***
Comment 3 Mirko Tietgen 2019-07-05 06:12:34 UTC
(In reply to Katrin Fischer from comment #1)
> Please link the bugs in cases like this - I didn't find this one :)
> Closing my duplicate.

I did, but as "See also" as I was not 100% sure 9834 is to blame. ;)
Comment 4 Katrin Fischer 2019-07-05 06:13:16 UTC
(In reply to Mirko Tietgen from comment #3)
> (In reply to Katrin Fischer from comment #1)
> > Please link the bugs in cases like this - I didn't find this one :)
> > Closing my duplicate.
> 
> I did, but as "See also" as I was not 100% sure 9834 is to blame. ;)

Might just be my morning me is not very awake yet :)
Comment 5 Jonathan Druart 2019-08-05 18:30:38 UTC
It comes from bug 12063 that is using Koha:: modules in updatedatabase.pl
Comment 6 Jonathan Druart 2019-08-06 14:11:42 UTC
Created attachment 92029 [details] [review]
Bug 23265: (bug 12063 follow-up) Remove Koha::Holds from updatedatabase

Test plan:
Have a DB that fail the 16.12.00.032 update, then apply this patch and
verify the expiration dates

RM: Please inforce this rule, no use of Koha:: in updatedatabase!
Comment 7 Victor Grousset/tuxayo 2019-09-03 15:31:36 UTC
Created attachment 92576 [details] [review]
Bug 23265: (bug 12063 follow-up) Remove Koha::Holds from updatedatabase

Test plan:
Have a DB that fail the 16.12.00.032 update, then apply this patch and
verify the expiration dates

RM: Please inforce this rule, no use of Koha:: in updatedatabase!

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Comment 8 Victor Grousset/tuxayo 2019-09-03 15:32:15 UTC
Thanks, I just stumbled on this issue :)
Comment 9 Marcel de Rooy 2019-09-06 05:42:55 UTC
Created attachment 92612 [details] [review]
Bug 23265: (bug 12063 follow-up) Remove Koha::Holds from updatedatabase

Test plan:
Have a DB that fail the 16.12.00.032 update, then apply this patch and
verify the expiration dates

RM: Please inforce this rule, no use of Koha:: in updatedatabase!

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Martin Renvoize 2019-09-06 12:12:26 UTC
Nice work!

Pushed to master for 19.11.00
Comment 11 Fridolin SOMERS 2019-09-09 06:55:22 UTC
Pushed to 19.05.x for 19.05.04
Comment 12 Lucas Gass 2019-09-24 20:23:41 UTC
backported to 18.11.x for 18.11.10