From ac4d97f9972b5c796acc645c1f72d06a248112c2 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 22 Dec 2014 05:56:33 -0500 Subject: [PATCH] Bug 11431 [1] - Update database Signed-off-by: Nick Clemens --- installer/data/mysql/kohastructure.sql | 14 ++++++++++++++ installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 25 +++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index a2f3e07..8de2e88 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3502,6 +3502,20 @@ CREATE TABLE items_search_fields ( ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- +-- Table structure for table 'audio_alerts' +-- + +DROP TABLE IF EXISTS audio_alerts; +CREATE TABLE audio_alerts ( + audio_alert_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 (audio_alert_id), + KEY precedence (precedence) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index db9fd84..2bb831a 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -41,6 +41,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AmazonLocale','US','US|CA|DE|FR|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'), ('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'), ('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for Suggestion and reading history privacy',''), +('AudioAlerts','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), ('AuthDisplayHierarchy','0','','Display authority hierarchies','YesNo'), ('AuthoritiesLog','1',NULL,'If ON, log edit/create/delete actions on authorities.','YesNo'), ('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'), @@ -383,7 +384,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SlipCSS','',NULL,'Slips CSS url.','free'), ('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'), ('SocialNetworks','0','','Enable/Disable social networks links in opac detail pages','YesNo'), -('soundon','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), ('SpecifyDueDate','1','','Define whether to display \"Specify Due Date\" form in Circulation','YesNo'), ('SpecifyReturnDate',1,'','Define whether to display \"Specify Return Date\" form in Circulation','YesNo'), ('SpineLabelAutoPrint','0','','If this setting is turned on, a print dialog will automatically pop up for the quick spine label printer.','YesNo'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c380800..e55acf5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9624,7 +9624,32 @@ if ( CheckVersion($DBversion) ) { }); print "Upgrade to $DBversion done (Bug 1861 - Unique patrons logins not (totally) enforced)\n"; } + 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 ( + audio_alert_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 (audio_alert_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); } -- 1.7.2.5