Bugzilla – Attachment 150824 Details for
Bug 33671
Database update 22.06.00.048 breaks update process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PUSHED] Bug 33671: Fix for 30472 - Remove null-guarantors
Bug-33671-Fix-for-30472---Remove-null-guarantors.patch (text/plain), 1.79 KB, created by
Jonathan Druart
on 2023-05-09 08:24:23 UTC
(
hide
)
Description:
[PUSHED] Bug 33671: Fix for 30472 - Remove null-guarantors
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-05-09 08:24:23 UTC
Size:
1.79 KB
patch
obsolete
>From b6ea9038df724cf25821af2bfc685c72c0a7bf16 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 4 May 2023 06:41:19 +0000 >Subject: [PATCH] Bug 33671: Fix for 30472 - Remove null-guarantors > >These guarantors cannot be added. They are of no use. > >NOTE FOR QA/RM: I do not think that it is needed to add a new >db rev for this change since it happens seldom. But if you think >that it is, just copy it to atomicupdate/change bugno. > >Test plan: >[1] Check your table definition and modify it: > alter table borrower_relationships modify column `guarantor_id` int(11) NULL; >[2] Add an empty guarantor: > insert into borrower_relationships (guarantee_id,relationship) values (SOME_PATRON_ID,'father'); >[3] Run the dbrev and verify that the inserted record has been removed. >[4] Check table definition with 'show create table borrower_relationships'. > You should see NOT NULL with guarantor_id. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > installer/data/mysql/db_revs/220600048.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/installer/data/mysql/db_revs/220600048.pl b/installer/data/mysql/db_revs/220600048.pl >index 9c35ccec5d9..8fb5e9c322a 100755 >--- a/installer/data/mysql/db_revs/220600048.pl >+++ b/installer/data/mysql/db_revs/220600048.pl >@@ -6,6 +6,11 @@ return { > up => sub { > my ($args) = @_; > my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ # Delete 'empty' guarantors. No longer possible to add them via interface. Have no use. >+ $dbh->do(q{ >+DELETE FROM borrower_relationships WHERE guarantor_id IS NULL >+ }); > $dbh->do(q{ > ALTER TABLE borrower_relationships CHANGE COLUMN guarantor_id guarantor_id int(11) NOT NULL > }); >-- >2.25.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 33671
:
150629
|
150630
| 150824 |
150825
|
153367
|
153533
|
153536