Bug 14224 - DBRev 16.12.00.029
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 27 Apr 2017 19:10:47 +0000 (19:10 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 27 Apr 2017 19:10:59 +0000 (19:10 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha.pm
installer/data/mysql/atomicupdate/bug_14224-add_new_issue_columns.perl [deleted file]
installer/data/mysql/atomicupdate/bug_14224-add_patron_notice_to_letters.sql [deleted file]
installer/data/mysql/atomicupdate/bug_14224-issue_notes_syspref.sql [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 07489a9..056b8a4 100644 (file)
--- 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.12.00.028";
+$VERSION = "16.12.00.029";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_14224-add_new_issue_columns.perl b/installer/data/mysql/atomicupdate/bug_14224-add_new_issue_columns.perl
deleted file mode 100644 (file)
index eaf8a98..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-$DBversion = 'XXX';
-if( CheckVersion( $DBversion ) ) {
-    unless( column_exists( 'issues', 'note' ) ) {
-        $dbh->do(q|ALTER TABLE issues ADD note mediumtext default NULL AFTER onsite_checkout|);
-    }
-    unless( column_exists( 'issues', 'notedate' ) ) {
-        $dbh->do(q|ALTER TABLE issues ADD notedate datetime default NULL AFTER note|);
-    }
-    unless( column_exists( 'old_issues', 'note' ) ) {
-        $dbh->do(q|ALTER TABLE old_issues ADD note mediumtext default NULL AFTER onsite_checkout|);
-    }
-    unless( column_exists( 'old_issues', 'notedate' ) ) {
-        $dbh->do(q|ALTER TABLE old_issues ADD notedate datetime default NULL AFTER note|);
-    }
-
-    SetVersion( $DBversion );
-    print "Upgrade to $DBversion done (Bug 14224: Add column issues.note and issues.notedate)\n";
-}
diff --git a/installer/data/mysql/atomicupdate/bug_14224-add_patron_notice_to_letters.sql b/installer/data/mysql/atomicupdate/bug_14224-add_patron_notice_to_letters.sql
deleted file mode 100644 (file)
index 135887e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-INSERT IGNORE INTO letter (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES ('circulation', 'PATRON_NOTE', '', 'Patron note on item', '0', 'Patron issue note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.item>> - <<biblio.author>> (<<biblio.biblionumber>>).','email');
diff --git a/installer/data/mysql/atomicupdate/bug_14224-issue_notes_syspref.sql b/installer/data/mysql/atomicupdate/bug_14224-issue_notes_syspref.sql
deleted file mode 100644 (file)
index 63d359f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`,`type`) VALUES ('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo');
index a7c3747..253a437 100755 (executable)
@@ -14291,6 +14291,35 @@ if( CheckVersion( $DBversion ) ) {
     print "Upgrade to $DBversion done (Bug 18110 - Adds FR to the syspref AddressFormat)\n";
 }
 
+$DBversion = '16.12.00.029';
+if( CheckVersion( $DBversion ) ) {
+    unless( column_exists( 'issues', 'note' ) ) {
+        $dbh->do(q|ALTER TABLE issues ADD note mediumtext default NULL AFTER onsite_checkout|);
+    }
+    unless( column_exists( 'issues', 'notedate' ) ) {
+        $dbh->do(q|ALTER TABLE issues ADD notedate datetime default NULL AFTER note|);
+    }
+    unless( column_exists( 'old_issues', 'note' ) ) {
+        $dbh->do(q|ALTER TABLE old_issues ADD note mediumtext default NULL AFTER onsite_checkout|);
+    }
+    unless( column_exists( 'old_issues', 'notedate' ) ) {
+        $dbh->do(q|ALTER TABLE old_issues ADD notedate datetime default NULL AFTER note|);
+    }
+
+    $dbh->do(q|
+        INSERT IGNORE INTO letter (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`)
+        VALUES ('circulation', 'PATRON_NOTE', '', 'Patron note on item', '0', 'Patron issue note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.item>> - <<biblio.author>> (<<biblio.biblionumber>>).','email');
+    |);
+
+    $dbh->do(q|
+        INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`,`type`)
+        VALUES ('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo');
+    |);
+
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 14224: Add column issues.note and issues.notedate)\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.