X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=installer%2Fdata%2Fmysql%2Fupdatedatabase.pl;h=5963d2422823e1f780cd965bbc18b1ab188de5a8;hb=7b21025e6bc092420756a141a728942e31083ad4;hp=13de2292f22f38906a8b9415b19fdce519f0cc39;hpb=ec3c8e95e012e65cb2444c8ed62e48af34b3788c;p=koha.git diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 13de2292f2..5963d24228 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6444,7 +6444,6 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } - $DBversion = "3.11.00.024"; if ( CheckVersion($DBversion) ) { $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacItemLocation','callnum','Show the shelving location of items in the opac','callnum|ccode|location','Choice');"); @@ -6949,6 +6948,68 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.13.00.004"; +if(CheckVersion($DBversion)) { + $dbh->do( +"INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowHoldNotes',0,'Show hold notes on OPAC','','YesNo')" + ); + print "Upgrade to $DBversion done (Bug 9722: Allow users to add notes when placing a hold in OPAC)\n"; + SetVersion($DBversion); +} + +$DBversion = "3.13.00.005"; +if(CheckVersion($DBversion)) { + my $intra= C4::Context->preference("intranetstylesheet"); + #if this pref is not blank or starting with http, https or / [root], then + #add an additional / to the front + if($intra && $intra !~ /^(\/|https?)/) { + $dbh->do("UPDATE systempreferences SET value=? WHERE variable=?", + undef,('/'.$intra,"intranetstylesheet")); + print "WARNING: Your system preference intranetstylesheet has been prefixed with a slash to make it an absolute path.\n"; + } + print "Upgrade to $DBversion done (Bug 10052: Make intranetstylesheet and intranetcolorstylesheet behave exactly like their opac counterparts)\n"; + SetVersion ($DBversion); +} + +$DBversion = "3.13.00.006"; +if ( CheckVersion($DBversion) ) { + $dbh->do( + q{ +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo'); +} + ); + print +"Upgrade to $DBversion done (Bug 10120 - Fines on item return controlled by a systempreference)\n"; + SetVersion($DBversion); +} + +$DBversion = "3.13.00.007"; +if ( CheckVersion($DBversion) ) { + $dbh->do("UPDATE systempreferences SET variable='OpacHoldNotes' WHERE variable='OpacShowHoldNotes'"); + print "Upgrade to $DBversion done (Bug 10343: Rename OpacShowHoldNotes to OpacHoldNotes)\n"; + SetVersion($DBversion); +} + +$DBversion = "3.13.00.008"; +if ( CheckVersion($DBversion) ) { + $dbh->do(" +CREATE TABLE IF NOT EXISTS borrower_files ( + file_id int(11) NOT NULL AUTO_INCREMENT, + borrowernumber int(11) NOT NULL, + file_name varchar(255) NOT NULL, + file_type varchar(255) NOT NULL, + file_description varchar(255) DEFAULT NULL, + file_content longblob NOT NULL, + date_uploaded timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (file_id), + KEY borrowernumber (borrowernumber), + CONSTRAINT borrower_files_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + "); + print "Upgrade to $DBversion done (Bug 10443: make sure borrower_files table exists)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table)