Bug 11431: (follow-up) Update database
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 25 Nov 2015 13:17:52 +0000 (13:17 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 25 Nov 2015 14:21:57 +0000 (11:21 -0300)
This patch specifies the collate for the new audio_alerts table to the updatedb entry.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl

index 146565c..fa44ff7 100644 (file)
@@ -3594,7 +3594,7 @@ CREATE TABLE audio_alerts (
   sound varchar(255) NOT NULL,
   PRIMARY KEY (id),
   KEY precedence (precedence)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8  COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 
 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
index 6ba8e4d..3d52d39 100755 (executable)
@@ -11268,11 +11268,11 @@ if ( CheckVersion($DBversion) ) {
             sound varchar(255) NOT NULL,
             PRIMARY KEY (id),
             KEY precedence (precedence)
-        ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+        ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
     });
 
     $dbh->do(q{
-        INSERT INTO audio_alerts VALUES
+        INSERT IGNORE 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');