From ee819e6862cab4a504828de17a24f1f08d635df7 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 23 Jan 2018 01:36:22 +0000 Subject: [PATCH] Bug 18915: DBRev 17.11.01.001 Signed-off-by: Nick Clemens --- Koha.pm | 2 +- ...g_18915_-_modifying_patron_note_notice.sql | 4 ---- installer/data/mysql/updatedatabase.pl | 20 +++++++++++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_18915_-_modifying_patron_note_notice.sql diff --git a/Koha.pm b/Koha.pm index 5630f74f99..d0befdd791 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.11.01.000"; +$VERSION = "17.11.01.001"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_18915_-_modifying_patron_note_notice.sql b/installer/data/mysql/atomicupdate/bug_18915_-_modifying_patron_note_notice.sql deleted file mode 100644 index 8fd6b6e974..0000000000 --- a/installer/data/mysql/atomicupdate/bug_18915_-_modifying_patron_note_notice.sql +++ /dev/null @@ -1,4 +0,0 @@ --- For installations having the note already -UPDATE letter SET code = 'CHECKOUT_NOTE', name = 'Checkout note on item set by patron', title = 'Checkout note', content = REPLACE(content, "<>", "<>") WHERE code = 'PATRON_NOTE'; --- For installations coming from 17.11 -INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES ('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e88cfc38e6..9a8cd46abc 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -15072,6 +15072,26 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Koha 17.11)\n"; } +$DBversion = '17.11.01.001'; +if( CheckVersion( $DBversion ) ) { + #For installations having the note already + $dbh->do(q{ + UPDATE letter + SET code = 'CHECKOUT_NOTE', + name = 'Checkout note on item set by patron', + title = 'Checkout note', + content = REPLACE(content, "<>", "<>") + WHERE code = 'PATRON_NOTE'; + }); + #For installations coming from 17.11 + $dbh->do(q{ + INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) + VALUES ('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<> <> has added a note to the item <> - <> (<>).','email') + }); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 18915 - Correct CHECKOUT_NOTE notice template)\n"; +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5