From 2354e41b6191d44be1d1e9e8830359335b3b87d6 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 28 Oct 2016 11:54:58 +0000 Subject: [PATCH] Bug 5260 - DBRev 16.06.00.040 Signed-off-by: Kyle M Hall --- Koha.pm | 2 +- .../atomicupdate/bug_5260_acq_email_orders.sql | 4 ---- installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_5260_acq_email_orders.sql diff --git a/Koha.pm b/Koha.pm index 6c0cc14a7e..f0d11807f5 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 = "16.06.00.039"; +$VERSION = "16.06.00.040"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_5260_acq_email_orders.sql b/installer/data/mysql/atomicupdate/bug_5260_acq_email_orders.sql deleted file mode 100644 index 5bc8bb3ed3..0000000000 --- a/installer/data/mysql/atomicupdate/bug_5260_acq_email_orders.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `aqcontacts` ADD `orderacquisition` BOOLEAN NOT NULL DEFAULT 0 AFTER `notes`; - -INSERT IGNORE INTO `letter` (module, code, name, title, content, message_transport_type) VALUES -('orderacquisition','ACQORDER','Acquisition order','Order','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nPlease order for the library:\r\n\r\nOrdernumber <> (<>) (quantity: <>) ($<> each).\r\n\r\nThank you,\n\n<>', 'email'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 585934ab41..ba369b8d99 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -13395,6 +13395,20 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = '16.06.00.040'; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + ALTER TABLE `aqcontacts` ADD `orderacquisition` BOOLEAN NOT NULL DEFAULT 0 AFTER `notes`; + }); + $dbh->do(q{ + INSERT IGNORE INTO `letter` (module, code, name, title, content, message_transport_type) VALUES + ('orderacquisition','ACQORDER','Acquisition order','Order','<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n<>\r\n\r\nPlease order for the library:\r\n\r\nOrdernumber <> (<>) (quantity: <>) ($<> each).\r\n\r\nThank you,\n\n<>', 'email'); + }); + + print "Upgrade to $DBversion done (Bug 5260 - Add option to send an order by e-mail to the acquisition module)\n"; + SetVersion($DBversion); +} + # 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