From 46cf3910a368ce5affdc9517c0a5f28d360bdbcb Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 19 Apr 2018 12:28:16 -0300 Subject: [PATCH] Bug 18786: DBRev 17.12.00.033 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_18786.perl | 12 ------------ installer/data/mysql/updatedatabase.pl | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 13 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_18786.perl diff --git a/Koha.pm b/Koha.pm index 3367c947ba..6acd0dc149 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "17.12.00.032"; +$VERSION = "17.12.00.033"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_18786.perl b/installer/data/mysql/atomicupdate/bug_18786.perl deleted file mode 100644 index 4d06f6ce80..0000000000 --- a/installer/data/mysql/atomicupdate/bug_18786.perl +++ /dev/null @@ -1,12 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - if ( !column_exists( 'accountlines', 'payment_type' ) ) { - $dbh->do( "ALTER TABLE accountlines ADD `payment_type` varchar(80) default NULL AFTER accounttype" ); - } - - $dbh->do(q{INSERT IGNORE INTO authorised_value_categories( category_name ) VALUES ('PAYMENT_TYPE')}); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 18786 - Add ability to create custom payment types)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3530f2ae60..1bacdfd138 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -15856,6 +15856,22 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 19794 - Rename RLIST notice to SERIAL_ALERT)\n"; } +$DBversion = '17.12.00.033'; +if( CheckVersion( $DBversion ) ) { + if ( !column_exists( 'accountlines', 'payment_type' ) ) { + $dbh->do(q{ + ALTER TABLE accountlines ADD payment_type varchar(80) default NULL AFTER accounttype + }); + } + + $dbh->do(q{ + INSERT IGNORE INTO authorised_value_categories( category_name ) VALUES ('PAYMENT_TYPE') + }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 18786 - Add ability to create custom payment types)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5