]> git.koha-community.org Git - koha.git/commit
Bug 20922: Remove use of Koha::Number::Price in updatedatabase.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 12 Jun 2018 16:12:25 +0000 (13:12 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 26 Jun 2018 07:48:25 +0000 (09:48 +0200)
commite6d956e7d6d4e0197a737b814a3df514c0b8875c
treec9b7e7c1b580858431a36a07237b1fcb947770ff
parent1e25709f9ce7ca10f2f14c9ae93ee5b5578c55b0
Bug 20922: Remove use of Koha::Number::Price in updatedatabase.pl

Koha::Number::Format->round use Number::Format->round with a precision=2
We should use it directly instead of Koha::* modules. It will avoid the
DB entry to fail because schema changes.

From the koha-devel list:

http://lists.koha-community.org/pipermail/koha-devel/2018-June/044608.html

16.06.00.042

Upgrade to 16.06.00.041 done (Bug 14629 - Add aggressive ISSN matching
feature equivalent to the aggressive ISBN matcher)
DBD::mysql::st execute failed: Unknown column 'me.p_sep_by_space' in
'field list' [for Statement "SELECT `me`.`currency`, `me`.`symbol`,
`me`.`isocode`, `me`.`timestamp`, `me`.`rate`, `me`.`active`,
`me`.`archived`, `me`.`p_sep_by_space` FROM `currency` `me` WHERE (
`active` = ? )" with ParamValues: 0=1] at
/usr/local/share/perl/5.24.1/DBIx/Class/Storage/DBI.pm line 1836.
DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column
'me.p_sep_by_space' in 'field list' at
/inlibro/git/koha-csf-prod-inlibro/Koha/Objects.pm line 209

Basically, the update code uses Koha::Number::Price, which in full
modern object mode goes for its newly added *p_sep_by_space* _in the
18.05 code_.  But the DB doesn't have it yet (it comes with 17.12.00.022).

Signed-off-by: Blou <philippe.blouin@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 93de5885098b9982a3ab9ad73ff73111d71ac3ef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 878f645c5dd6433cb78402b0658cca75e1b4e561)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/updatedatabase.pl