Bug 14321: DBRev 3.21.00.028

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomas Cohen Arazi 2015-09-25 15:17:34 -03:00
parent 9f753799d8
commit 42c19ee1cc
4 changed files with 19 additions and 7 deletions

View File

@ -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;

View File

@ -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;

View File

@ -1 +0,0 @@
ALTER TABLE uploaded_files CHANGE COLUMN categorycode uploadcategorycode tinytext;

View File

@ -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.