From b3bf52fefaa44003a4d2f7f708aeb775df84e7c9 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Thu, 24 Oct 2024 13:19:28 +0000 Subject: [PATCH] Bug 37969: DBRev 24.06.00.042 Signed-off-by: Katrin Fischer --- Koha.pm | 2 +- ...bug_37969_add_missing_language_code_nor.pl | 26 ---------- installer/data/mysql/db_revs/240600042.pl | 49 +++++++++++++++++++ 3 files changed, 50 insertions(+), 27 deletions(-) delete mode 100755 installer/data/mysql/atomicupdate/bug_37969_add_missing_language_code_nor.pl create mode 100755 installer/data/mysql/db_revs/240600042.pl diff --git a/Koha.pm b/Koha.pm index 511b5ce2fa..ca366581bf 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 = "24.06.00.041"; +$VERSION = "24.06.00.042"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_37969_add_missing_language_code_nor.pl b/installer/data/mysql/atomicupdate/bug_37969_add_missing_language_code_nor.pl deleted file mode 100755 index a8f507f5b8..0000000000 --- a/installer/data/mysql/atomicupdate/bug_37969_add_missing_language_code_nor.pl +++ /dev/null @@ -1,26 +0,0 @@ -use Modern::Perl; -use Koha::Installer::Output qw(say_warning say_failure say_success say_info); - -return { - bug_number => "37969", - description => "Add nor language code", - up => sub { - my ($args) = @_; - my ( $dbh, $out ) = @$args{qw(dbh out)}; - - $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'nb', 'language', 'no', 'Norsk bokmål'); }); - $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'nn', 'language', 'no', 'Norsk nynorsk'); }); - $dbh->do(q{ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'no', 'language', 'Norwegian','2024-09-19' ); }); - $dbh->do(q{ INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'no','nor'); }); - $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'nb', 'Norsk'); }); - $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'nn', 'Norsk'); }); - $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'no', 'Norsk'); }); - $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'en', 'Norwegian'); }); - $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'fr', 'Norvégien'); }); - $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'de', 'Norwegisch'); }); - $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'pl', 'Norweski'); }); - $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'NO', 'region', 'no', 'Noreg'); }); - - say $out "Added nor language code"; - }, -}; diff --git a/installer/data/mysql/db_revs/240600042.pl b/installer/data/mysql/db_revs/240600042.pl new file mode 100755 index 0000000000..2bae10ed56 --- /dev/null +++ b/installer/data/mysql/db_revs/240600042.pl @@ -0,0 +1,49 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); + +return { + bug_number => "37969", + description => "Add nor language code", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'nb', 'language', 'no', 'Norsk bokmål'); } + ); + $dbh->do( + q{ INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'nn', 'language', 'no', 'Norsk nynorsk'); } + ); + $dbh->do( + q{ INSERT IGNORE INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'no', 'language', 'Norwegian','2024-09-19' ); } + ); + $dbh->do( + q{ INSERT IGNORE INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'no','nor'); }); + $dbh->do( + q{ INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'nb', 'Norsk'); } + ); + $dbh->do( + q{ INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'nn', 'Norsk'); } + ); + $dbh->do( + q{ INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'no', 'Norsk'); } + ); + $dbh->do( + q{ INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'en', 'Norwegian'); } + ); + $dbh->do( + q{ INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'fr', 'Norvégien'); } + ); + $dbh->do( + q{ INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'de', 'Norwegisch'); } + ); + $dbh->do( + q{ INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'pl', 'Norweski'); } + ); + $dbh->do( + q{ INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'NO', 'region', 'no', 'Noreg'); } + ); + + say_success( $out, "Added nor language code" ); + }, +}; -- 2.39.5