Bugzilla – Attachment 83528 Details for
Bug 19066
Add branchcode to accountlines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19066: (QA follow-up) Define foreign key for branchcode
Bug-19066-QA-follow-up-Define-foreign-key-for-bran.patch (text/plain), 2.36 KB, created by
Alex Arnaud
on 2018-12-27 14:09:18 UTC
(
hide
)
Description:
Bug 19066: (QA follow-up) Define foreign key for branchcode
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2018-12-27 14:09:18 UTC
Size:
2.36 KB
patch
obsolete
>From 8e4e3770291734f87bd78498246537fe40562062 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 17 Dec 2018 11:15:50 +0000 >Subject: [PATCH] Bug 19066: (QA follow-up) Define foreign key for branchcode > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../mysql/atomicupdate/bug_19066_add_accountlines_branchcode.perl | 1 + > installer/data/mysql/kohastructure.sql | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_19066_add_accountlines_branchcode.perl b/installer/data/mysql/atomicupdate/bug_19066_add_accountlines_branchcode.perl >index 426d997..62bbd55 100644 >--- a/installer/data/mysql/atomicupdate/bug_19066_add_accountlines_branchcode.perl >+++ b/installer/data/mysql/atomicupdate/bug_19066_add_accountlines_branchcode.perl >@@ -3,6 +3,7 @@ if( CheckVersion( $DBversion ) ) { > > if( !column_exists( 'accountlines', 'branchcode' ) ) { > $dbh->do("ALTER TABLE accountlines ADD branchcode VARCHAR( 10 ) NULL DEFAULT NULL AFTER manager_id"); >+ $dbh->do("ALTER TABLE accountlines ADD CONSTRAINT accountlines_ibfk_branches FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE SET NULL ON UPDATE CASCADE"); > } > > # Always end with this (adjust the bug info) >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 807ae72..941b9f9 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2723,8 +2723,10 @@ CREATE TABLE `accountlines` ( > KEY `acctsborridx` (`borrowernumber`), > KEY `timeidx` (`timestamp`), > KEY `itemnumber` (`itemnumber`), >+ KEY `branchcode` (`branchcode`), > CONSTRAINT `accountlines_ibfk_borrowers` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, >- CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL >+ CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, >+ CONSTRAINT `accountlines_ibfk_branches` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE SET CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- >-- >2.7.4
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 19066
:
65769
|
65770
|
65771
|
67756
|
67757
|
71153
|
71154
|
71155
|
73185
|
73186
|
73187
|
73595
|
77281
|
77282
|
77283
|
78900
|
78901
|
81144
|
81145
|
81146
|
81253
|
81254
|
81255
|
81684
|
81912
|
81918
|
82047
|
82048
|
82084
|
82086
|
82087
|
82469
|
82470
|
82471
|
82473
|
82474
|
82475
|
82476
|
82477
|
82478
|
83067
|
83068
|
83069
|
83070
|
83071
|
83072
|
83073
|
83074
|
83075
|
83076
|
83077
|
83078
|
83079
|
83080
|
83081
|
83082
|
83083
|
83084
|
83275
|
83519
|
83520
|
83521
|
83522
|
83523
|
83524
|
83525
|
83526
|
83527
| 83528 |
83628