Bugzilla – Attachment 112292 Details for
Bug 24412
Attach waiting hold to desk
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24412: (QA follow-up) Change CASCADE DELETE to SET NULL
Bug-24412-QA-follow-up-Change-CASCADE-DELETE-to-SE.patch (text/plain), 2.86 KB, created by
Martin Renvoize (ashimema)
on 2020-10-23 14:50:01 UTC
(
hide
)
Description:
Bug 24412: (QA follow-up) Change CASCADE DELETE to SET NULL
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-10-23 14:50:01 UTC
Size:
2.86 KB
patch
obsolete
>From 54ad2737be6b3d939a3696081b71e94adcfcffe1 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 23 Oct 2020 15:46:03 +0100 >Subject: [PATCH] Bug 24412: (QA follow-up) Change CASCADE DELETE to SET NULL > >I don't believe waiting reserves should be removed if a desk is deleted, >we should instead simply unset the desk. >--- > .../bug_24412_Attach_waiting_reserve_to_desk.perl | 4 ++-- > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_24412_Attach_waiting_reserve_to_desk.perl b/installer/data/mysql/atomicupdate/bug_24412_Attach_waiting_reserve_to_desk.perl >index 9242ffbd3d..011b734d6a 100644 >--- a/installer/data/mysql/atomicupdate/bug_24412_Attach_waiting_reserve_to_desk.perl >+++ b/installer/data/mysql/atomicupdate/bug_24412_Attach_waiting_reserve_to_desk.perl >@@ -4,7 +4,7 @@ if( CheckVersion( $DBversion ) ) { > $dbh->do(q{ > ALTER TABLE reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode, > ADD KEY desk_id (`desk_id`), >- ADD CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE CASCADE ON UPDATE CASCADE ; >+ ADD CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE SET NULL ON UPDATE CASCADE ; > }); > $dbh->do(q{ > ALTER TABLE old_reserves ADD COLUMN desk_id INT(11) DEFAULT NULL AFTER branchcode, >@@ -12,6 +12,6 @@ if( CheckVersion( $DBversion ) ) { > }); > > SetVersion( $DBversion ); >- print "Upgrade to $DBversion done (Bug XXXXX - Attach waiting reserve to desk)\n"; >+ print "Upgrade to $DBversion done (Bug 24412 - Attach waiting reserve to desk)\n"; > } > } >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 82290154cf..0a4153c37d 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1792,7 +1792,7 @@ CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha > CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE, >- CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE CASCADE ON UPDATE CASCADE >+ CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE SET NULL ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- >-- >2.20.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 24412
:
97328
|
97329
|
97330
|
101625
|
101626
|
101627
|
101628
|
101629
|
101630
|
101721
|
101722
|
101723
|
101825
|
101884
|
101885
|
101886
|
101898
|
101899
|
101900
|
101955
|
101956
|
101957
|
106586
|
106648
|
110067
|
110068
|
110069
|
110070
|
110450
|
110451
|
110452
|
110453
|
110454
|
110455
|
110582
|
110583
|
110584
|
110585
|
110586
|
112046
|
112047
|
112048
|
112049
|
112050
|
112092
|
112099
|
112165
|
112166
|
112167
|
112168
|
112169
|
112170
|
112171
|
112172
|
112201
|
112202
|
112203
|
112204
|
112205
|
112206
|
112207
|
112208
|
112209
|
112210
|
112211
|
112212
|
112213
|
112214
|
112215
|
112216
|
112217
|
112218
|
112219
|
112264
|
112265
|
112266
|
112267
|
112268
|
112269
|
112270
|
112271
|
112272
|
112292
|
112293
|
113108
|
113109
|
113116
|
113228
|
113229
|
113230
|
113231
|
113232
|
113233
|
113234
|
113235
|
113236