From 29e97b85f0f5e0b11a5120c7560bb3bfa9a82898 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 4 Nov 2015 12:09:28 -0300 Subject: [PATCH] Bug 11431: DBRev 3.21.00.049 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- installer/data/mysql/updatedatabase.pl | 53 +++++++++++++------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/Koha.pm b/Koha.pm index 7e90add251..01754de143 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.048"; +$VERSION = "3.21.00.049"; sub version { return $VERSION; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e3decbe136..c0aa7f279c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9652,7 +9652,6 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } - $DBversion = "3.19.00.003"; if ( CheckVersion($DBversion) ) { my ($count) = $dbh->selectrow_array("SELECT COUNT(*) FROM borrowers GROUP BY userid HAVING COUNT(userid) > 1"); @@ -9672,32 +9671,6 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } -$DBversion = "3.19.00.XXX"; -if ( CheckVersion($DBversion) ) { - $dbh->do(q{UPDATE systempreferences SET variable = 'AudioAlerts' WHERE variable = 'soundon'}); - - $dbh->do(q{ - CREATE TABLE audio_alerts ( - id int(11) NOT NULL AUTO_INCREMENT, - precedence smallint(5) unsigned NOT NULL, - selector varchar(255) NOT NULL, - sound varchar(255) NOT NULL, - PRIMARY KEY (id), - KEY precedence (precedence) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - }); - - $dbh->do(q{ - INSERT INTO audio_alerts VALUES - (1, 1, '.audio-alert-action', 'opening.ogg'), - (2, 2, '.audio-alert-warning', 'critical.ogg'), - (3, 3, '.audio-alert-success', 'beep.ogg'); - }); - - print "Upgrade to $DBversion done (Bug 11431 - Add additional sound options for warnings)\n"; - SetVersion($DBversion); -} - $DBversion = "3.19.00.004"; if ( CheckVersion($DBversion) ) { my $pref_value = C4::Context->preference('OpacExportOptions'); @@ -11282,6 +11255,32 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.21.00.049"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{UPDATE systempreferences SET variable = 'AudioAlerts' WHERE variable = 'soundon'}); + + $dbh->do(q{ + CREATE TABLE audio_alerts ( + id int(11) NOT NULL AUTO_INCREMENT, + precedence smallint(5) unsigned NOT NULL, + selector varchar(255) NOT NULL, + sound varchar(255) NOT NULL, + PRIMARY KEY (id), + KEY precedence (precedence) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + }); + + $dbh->do(q{ + INSERT INTO audio_alerts VALUES + (1, 1, '.audio-alert-action', 'opening.ogg'), + (2, 2, '.audio-alert-warning', 'critical.ogg'), + (3, 3, '.audio-alert-success', 'beep.ogg'); + }); + + print "Upgrade to $DBversion done (Bug 11431: Add additional sound options for warnings)\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