Bugzilla – Attachment 129153 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: Add missing constraints from bug 15067
Bug-29605-Add-missing-constraints-from-bug-15067.patch (text/plain), 2.70 KB, created by
Nick Clemens (kidclamp)
on 2022-01-07 13:16:06 UTC
(
hide
)
Description:
Bug 29605: Add missing constraints from bug 15067
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-01-07 13:16:06 UTC
Size:
2.70 KB
patch
obsolete
>From 7dc507e0ae32875051812eb32d2afe92cdb7512e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 30 Nov 2021 19:44:36 -0300 >Subject: [PATCH] Bug 29605: Add missing constraints from bug 15067 > >This patch fixes a missed update to kohastructure.sql. > >To test: >1. Checkout prior to bug 15067 >(ab270c026be06f08745a14d1aea992877d20f812) would work. >2. Run: > $ reset_all >3. Checkout v21.11.00 >4. Run: > $ updatedatabase > $ koha-mysql kohadev > > SHOW CREATE TABLE language_subtag_registry; >=> SUCCESS: There's UNIQUE KEY uniq_lang (subtag, type) >5. Run: > > SHOW CREATE TABLE language_descriptions; >=> SUCCESS: There's UNIQUE KEY uniq_desc (subtag, type, lang) >6. Run: > > SHOW CREATE TABLE language_rfc4646_to_iso639; >=> SUCCESS: There's UNIQUE KEY uniq_code (rfc4646_subtag, iso639_2_code) >7. Replicate a fresh install. Run: > $ reset_all >8. Repeat 4, 5 and 6 >=> FAIL: The UNIQUE constraints are not there! >9. Apply this patch >10. Run: > $ reset_all >11. Repeat 8 >=> SUCCESS: The UNIQUE constraints are there! >12. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > installer/data/mysql/kohastructure.sql | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index a309cea736..3869b55ccc 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3216,7 +3216,7 @@ CREATE TABLE `language_descriptions` ( > `id` int(11) NOT NULL AUTO_INCREMENT, > PRIMARY KEY (`id`), > KEY `lang` (`lang`), >- KEY `subtag_type_lang` (`subtag`,`type`,`lang`) >+ UNIQUE KEY `uniq_desc` (`subtag`,`type`,`lang`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; > >@@ -3232,7 +3232,8 @@ CREATE TABLE `language_rfc4646_to_iso639` ( > `iso639_2_code` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL, > `id` int(11) NOT NULL AUTO_INCREMENT, > PRIMARY KEY (`id`), >- KEY `rfc4646_subtag` (`rfc4646_subtag`) >+ KEY `rfc4646_subtag` (`rfc4646_subtag`), >+ UNIQUE KEY `uniq_code` (`rfc4646_subtag`, `iso639_2_code`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; > >@@ -3278,7 +3279,8 @@ CREATE TABLE `language_subtag_registry` ( > `added` date DEFAULT NULL, > `id` int(11) NOT NULL AUTO_INCREMENT, > PRIMARY KEY (`id`), >- KEY `subtag` (`subtag`) >+ KEY `subtag` (`subtag`), >+ UNIQUE KEY `uniq_lang` (`subtag`, `type`) > ) 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