Bug 26268: (QA follow-up) Split DB update checks
This patch splits the DB update such that the 'paidfor' field is checked for distinctly in the deleteditems table rather than assuming if it exists in the items table it will also exist in deleteditems. We also correct the check as highlights by Julian. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
ff64264092
commit
7d2b6a3f35
|
|
@ -1,8 +1,11 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
|
||||
if( !column_exists( 'items', 'paidfor' ) ) {
|
||||
if( column_exists( 'items', 'paidfor' ) ) {
|
||||
$dbh->do(q|ALTER TABLE items DROP COLUMN paidfor|);
|
||||
}
|
||||
|
||||
if ( column_exists( 'deleteditems', 'paidfor' ) ) {
|
||||
$dbh->do(q|ALTER TABLE deleteditems DROP COLUMN paidfor|);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue