From 856861b47ee7e0658f790391fbf22af38e48616b Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 24 Apr 2015 10:03:17 -0300 Subject: [PATCH] Bug 14030: DBRev 3.19.00.030 Signed-off-by: Tomas Cohen Arazi --- ...ug_14030-Add_Georgian_fix_Kannada_code.sql | 43 ------------ installer/data/mysql/updatedatabase.pl | 65 +++++++++++++++++++ kohaversion.pl | 2 +- 3 files changed, 66 insertions(+), 44 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_14030-Add_Georgian_fix_Kannada_code.sql diff --git a/installer/data/mysql/atomicupdate/bug_14030-Add_Georgian_fix_Kannada_code.sql b/installer/data/mysql/atomicupdate/bug_14030-Add_Georgian_fix_Kannada_code.sql deleted file mode 100644 index 59ac0cebfc..0000000000 --- a/installer/data/mysql/atomicupdate/bug_14030-Add_Georgian_fix_Kannada_code.sql +++ /dev/null @@ -1,43 +0,0 @@ -UPDATE language_subtag_registry SET subtag = 'kn' WHERE subtag = 'ka' AND description = 'Kannada'; - -UPDATE language_rfc4646_to_iso639 SET rfc4646_subtag = 'kn' WHERE rfc4646_subtag = 'ka' AND iso639_2_code = 'kan'; - -UPDATE language_descriptions SET subtag = 'kn', lang = 'kn' WHERE subtag = 'ka' AND lang = 'ka' AND description = 'ಕನ್ನಡ'; - -UPDATE language_descriptions SET subtag = 'kn' WHERE subtag = 'ka' AND description = 'Kannada'; - -INSERT IGNORE INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'ka', 'language', 'Georgian','2015-04-20'); -DELETE FROM language_subtag_registry - WHERE NOT id IN - (SELECT id FROM - (SELECT MIN(id) as id,subtag,type,description,added - FROM language_subtag_registry - GROUP BY subtag,type,description,added) - AS subtable); - - -INSERT IGNORE INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'ka', 'geo'); -DELETE FROM language_rfc4646_to_iso639 - WHERE NOT id IN - (SELECT id FROM - (SELECT MIN(id) as id,rfc4646_subtag,iso639_2_code - FROM language_rfc4646_to_iso639 - GROUP BY rfc4646_subtag,iso639_2_code) - AS subtable); - -INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'ka', 'ქართული'); - -INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'en', 'Georgian'); - -INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'fr', 'Géorgien'); - -INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'de', 'Georgisch'); - -INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'es', 'Georgiano'); - -DELETE FROM language_descriptions - WHERE NOT id IN - (SELECT id FROM - (SELECT MIN(id) as id,subtag,type,lang,description - FROM language_descriptions GROUP BY subtag,type,lang,description) - AS subtable); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f3fd7949da..8b255b69cc 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10192,6 +10192,71 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.19.00.030"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q| +UPDATE language_subtag_registry SET subtag = 'kn' WHERE subtag = 'ka' AND description = 'Kannada'; + |); + $dbh->do(q| +UPDATE language_rfc4646_to_iso639 SET rfc4646_subtag = 'kn' WHERE rfc4646_subtag = 'ka' AND iso639_2_code = 'kan'; + |); + $dbh->do(q| +UPDATE language_descriptions SET subtag = 'kn', lang = 'kn' WHERE subtag = 'ka' AND lang = 'ka' AND description = 'ಕನ್ನಡ'; + |); + $dbh->do(q| +UPDATE language_descriptions SET subtag = 'kn' WHERE subtag = 'ka' AND description = 'Kannada'; + |); + $dbh->do(q| +INSERT IGNORE INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'ka', 'language', 'Georgian','2015-04-20'); + |); + $dbh->do(q| +DELETE FROM language_subtag_registry + WHERE NOT id IN + (SELECT id FROM + (SELECT MIN(id) as id,subtag,type,description,added + FROM language_subtag_registry + GROUP BY subtag,type,description,added) + AS subtable); + |); + $dbh->do(q| +INSERT IGNORE INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'ka', 'geo'); + |); + $dbh->do(q| +DELETE FROM language_rfc4646_to_iso639 + WHERE NOT id IN + (SELECT id FROM + (SELECT MIN(id) as id,rfc4646_subtag,iso639_2_code + FROM language_rfc4646_to_iso639 + GROUP BY rfc4646_subtag,iso639_2_code) + AS subtable); + |); + $dbh->do(q| +INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'ka', 'ქართული'); + |); + $dbh->do(q| +INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'en', 'Georgian'); + |); + $dbh->do(q| +INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'fr', 'Géorgien'); + |); + $dbh->do(q| +INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'de', 'Georgisch'); + |); + $dbh->do(q| +INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'es', 'Georgiano'); + |); + $dbh->do(q| +DELETE FROM language_descriptions + WHERE NOT id IN + (SELECT id FROM + (SELECT MIN(id) as id,subtag,type,lang,description + FROM language_descriptions GROUP BY subtag,type,lang,description) + AS subtable); + |); + print "Upgrade to $DBversion done (Bug 13606: Upgrade sessions.a_session to MEDIUMTEXT)\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. diff --git a/kohaversion.pl b/kohaversion.pl index e39bc20b3e..0828f0823a 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -17,7 +17,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.19.00.029'; + our $VERSION = '3.19.00.030'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5