From 42c19ee1cc817d28a21591b2ed5fba5f1172f133 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 25 Sep 2015 15:17:34 -0300 Subject: [PATCH] Bug 14321: DBRev 3.21.00.028 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- .../data/mysql/atomicupdate/14321a_public.sql | 5 ----- .../mysql/atomicupdate/14321b_category.sql | 1 - installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++++ 4 files changed, 19 insertions(+), 7 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/14321a_public.sql delete mode 100644 installer/data/mysql/atomicupdate/14321b_category.sql diff --git a/Koha.pm b/Koha.pm index 92197e4b2f..173e5f8db8 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 = "3.21.00.027"; +$VERSION = "3.21.00.028"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/14321a_public.sql b/installer/data/mysql/atomicupdate/14321a_public.sql deleted file mode 100644 index ef251d8bef..0000000000 --- a/installer/data/mysql/atomicupdate/14321a_public.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE uploaded_files - ADD COLUMN public tinyint, - ADD COLUMN permanent tinyint; --- Any records already there are public and permanent storage -UPDATE uploaded_files SET public=1, permanent=1; diff --git a/installer/data/mysql/atomicupdate/14321b_category.sql b/installer/data/mysql/atomicupdate/14321b_category.sql deleted file mode 100644 index 37e251ce43..0000000000 --- a/installer/data/mysql/atomicupdate/14321b_category.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE uploaded_files CHANGE COLUMN categorycode uploadcategorycode tinytext; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 090fe94e13..93dc31b3f3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10896,6 +10896,24 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.21.00.028"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + ALTER TABLE uploaded_files + ADD COLUMN public tinyint, + ADD COLUMN permanent tinyint + }); + $dbh->do(q{ + UPDATE uploaded_files SET public=1, permanent=1 + }); + $dbh->do(q{ + ALTER TABLE uploaded_files + CHANGE COLUMN categorycode uploadcategorycode tinytext + }); + print "Upgrade to $DBversion done (Bug 14321: Merge UploadedFile and UploadedFiles into Koha::Upload)\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