Bug 23081: DBRev 19.12.00.080
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 27 Apr 2020 10:34:29 +0000 (11:34 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 27 Apr 2020 10:34:29 +0000 (11:34 +0100)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha.pm
installer/data/mysql/atomicupdate/bug_23081-change-default-of-issues-field.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 14025c6..1641e5b 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 = "19.12.00.079";
+$VERSION = "19.12.00.080";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_23081-change-default-of-issues-field.perl b/installer/data/mysql/atomicupdate/bug_23081-change-default-of-issues-field.perl
deleted file mode 100644 (file)
index 204d999..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
-    # you can use $dbh here like:
-     $dbh->do( "UPDATE items set issues=0 where issues is null" );
-     $dbh->do( "UPDATE deleteditems set issues=0 where issues is null" );
-     $dbh->do( "ALTER TABLE items ALTER issues set default 0" );
-     $dbh->do( "ALTER TABLE deleteditems ALTER issues set default 0" );
-    # or perform some test and warn
-    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
-    #    warn "There is something wrong";
-    # }
-
-    # Always end with this (adjust the bug info)
-    NewVersion( $DBversion, 23081, "Set default to 0 for items.issues");
-}
index def5093..42bb38b 100755 (executable)
@@ -21853,6 +21853,16 @@ if( CheckVersion( $DBversion ) ) {
     NewVersion( $DBversion, 25045, "Add a way to restrict anonymous access to public routes (OpacPublic behaviour)");
 }
 
+$DBversion = '19.12.00.080';
+if( CheckVersion( $DBversion ) ) {
+     $dbh->do( "UPDATE items set issues=0 where issues is null" );
+     $dbh->do( "UPDATE deleteditems set issues=0 where issues is null" );
+     $dbh->do( "ALTER TABLE items ALTER issues set default 0" );
+     $dbh->do( "ALTER TABLE deleteditems ALTER issues set default 0" );
+
+    NewVersion( $DBversion, 23081, "Set default to 0 for items.issues");
+}
+
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.
 my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';