Bug 29605: Add missing constraints from bug 15067
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 30 Nov 2021 22:44:36 +0000 (19:44 -0300)
committerKyle Hall <kyle@bywatersolutions.com>
Mon, 7 Feb 2022 17:31:17 +0000 (12:31 -0500)
commit5ded795bf5280a5adcbaa72528e2fd73c4adccc8
tree35c2cf7af3b52510cff4e8111245437e0a03ab57
parent31670dc49b158f2e408a3ecbab21882a4048aed8
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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
installer/data/mysql/kohastructure.sql