Bugzilla – Attachment 55372 Details for
Bug 17216
Add a new table to store authorized value categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17216: Add FK on authorised_values.category
Bug-17216-Add-FK-on-authorisedvaluescategory.patch (text/plain), 2.05 KB, created by
Jonathan Druart
on 2016-09-08 17:43:53 UTC
(
hide
)
Description:
Bug 17216: Add FK on authorised_values.category
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-09-08 17:43:53 UTC
Size:
2.05 KB
patch
obsolete
>From 6669080fc5c76d990730c481ea4edfb1ae89c0b8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 30 Aug 2016 11:55:52 +0100 >Subject: [PATCH] Bug 17216: Add FK on authorised_values.category > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > installer/data/mysql/atomicupdate/bug_17216_1_add_table.sql | 2 ++ > installer/data/mysql/kohastructure.sql | 3 ++- > 2 files changed, 4 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_17216_1_add_table.sql b/installer/data/mysql/atomicupdate/bug_17216_1_add_table.sql >index cc5ac6e..07dcb83 100644 >--- a/installer/data/mysql/atomicupdate/bug_17216_1_add_table.sql >+++ b/installer/data/mysql/atomicupdate/bug_17216_1_add_table.sql >@@ -45,3 +45,5 @@ ALTER TABLE items_search_fields > DROP FOREIGN KEY items_search_fields_authorised_values_category; > ALTER TABLE items_search_fields > ADD CONSTRAINT `items_search_fields_authorised_values_category` FOREIGN KEY (`authorised_values_category`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE SET NULL ON UPDATE CASCADE; >+ALTER TABLE authorised_values >+ ADD CONSTRAINT `authorised_values_authorised_values_category` FOREIGN KEY (`category`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE CASCADE ON UPDATE CASCADE; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 3ab77e1..356f195 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -118,7 +118,8 @@ CREATE TABLE `authorised_values` ( -- stores values for authorized values catego > PRIMARY KEY (`id`), > KEY `name` (`category`), > KEY `lib` (`lib`), >- KEY `auth_value_idx` (`authorised_value`) >+ KEY `auth_value_idx` (`authorised_value`), >+ CONSTRAINT `authorised_values_authorised_values_category` FOREIGN KEY (`category`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE CASCADE ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > > -- >-- >2.8.1
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 17216
:
54979
|
54980
|
54981
|
54982
|
54983
|
54984
|
54985
|
54987
|
54988
|
54989
|
54990
|
54991
|
54992
|
54993
|
55003
|
55004
|
55005
|
55008
|
55009
|
55010
|
55011
|
55021
|
55022
|
55023
|
55024
|
55025
|
55026
|
55027
|
55028
|
55029
|
55030
|
55031
|
55032
|
55047
|
55207
|
55208
|
55209
|
55210
|
55211
|
55212
|
55213
|
55214
|
55215
|
55216
|
55217
|
55218
|
55365
|
55366
|
55367
|
55368
|
55369
|
55370
|
55371
|
55372
|
55373
|
55374
|
55375
|
55376
|
55692
|
55693
|
55835
|
55840
|
56202
|
56203
|
56204
|
56205
|
56206
|
56207
|
56208
|
56209
|
56210
|
56211
|
56212
|
56213
|
56214
|
56215
|
56216
|
56217
|
56619
|
57729