Bugzilla – Attachment 129154 Details for
Bug 29605
DB structure may not be synced with kohastructure.sql
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29605: (follow-up) Add language_script_mapping primary key
Bug-29605-follow-up-Add-languagescriptmapping-prim.patch (text/plain), 2.31 KB, created by
Nick Clemens (kidclamp)
on 2022-01-07 13:16:10 UTC
(
hide
)
Description:
Bug 29605: (follow-up) Add language_script_mapping primary key
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-01-07 13:16:10 UTC
Size:
2.31 KB
patch
obsolete
>From 02eab41d9d4ab322663709132826cbff730c6dc8 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 30 Nov 2021 20:06:46 -0300 >Subject: [PATCH] Bug 29605: (follow-up) Add language_script_mapping primary > key > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../data/mysql/atomicupdate/bug_29605.pl | 27 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 28 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_29605.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_29605.pl b/installer/data/mysql/atomicupdate/bug_29605.pl >new file mode 100755 >index 0000000000..4a2cfe022e >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_29605.pl >@@ -0,0 +1,27 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "29605", >+ description => "Add language_script_mapping primary key", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh) = @$args{qw(dbh)}; >+ >+ if ( !primary_key_exists( 'language_script_mapping', 'language_subtag' ) >+ and index_exists( 'language_script_mapping', 'language_subtag' ) ) { >+ >+ $dbh->do(q{ >+ ALTER TABLE language_script_mapping >+ DROP KEY `language_subtag`; >+ }); >+ } >+ >+ if ( !primary_key_exists( 'language_script_mapping', 'language_subtag' ) ) { >+ >+ $dbh->do(q{ >+ ALTER TABLE language_script_mapping >+ ADD PRIMARY KEY `language_subtag` (`language_subtag`); >+ }); >+ } >+ }, >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 3869b55ccc..91877d51b3 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3261,7 +3261,7 @@ DROP TABLE IF EXISTS `language_script_mapping`; > CREATE TABLE `language_script_mapping` ( > `language_subtag` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL, > `script_subtag` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL, >- KEY `language_subtag` (`language_subtag`) >+ PRIMARY KEY `language_subtag` (`language_subtag`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29605
:
128113
|
128114
|
128152
|
128153
|
128154
|
128155
|
128156
|
128157
|
128158
|
128239
|
128313
|
128314
|
128437
|
128438
|
128439
|
128440
|
128441
|
128442
|
128443
|
128444
|
128445
|
128483
|
129153
| 129154 |
129155
|
129156
|
129157
|
129158
|
129159
|
129160
|
129161