From f9efe84a2d382df3091f5b6eea76c2fdab143fbc Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Tue, 30 Jan 2018 09:26:39 +0100 Subject: [PATCH] Bug 18915: DBRev 17.05.08.001 Signed-off-by: Fridolin Somers --- 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 b8f2336584..edf36c4332 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.05.08.000"; +$VERSION = "17.05.08.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 b0a83a5102..502ef1411e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -14635,6 +14635,26 @@ if ( CheckVersion($DBversion) ) { print "Upgrade to $DBversion done (Koha 17.05.08)\n"; } +$DBversion = '17.05.08.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