Bugzilla – Attachment 139711 Details for
Bug 30472
Field borrower_relationships.guarantor_id should be marked as NOT NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30472: Make borrower_relationships.guarantor_id not null
Bug-30472-Make-borrowerrelationshipsguarantorid-no.patch (text/plain), 1.90 KB, created by
Marcel de Rooy
on 2022-08-24 11:40:50 UTC
(
hide
)
Description:
Bug 30472: Make borrower_relationships.guarantor_id not null
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-08-24 11:40:50 UTC
Size:
1.90 KB
patch
obsolete
>From 93ac458ac347bc6abf1c034fb5dcb352669848de Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 24 Aug 2022 11:37:55 +0000 >Subject: [PATCH] Bug 30472: Make borrower_relationships.guarantor_id not null >Content-Type: text/plain; charset=utf-8 > >In harmony with dbrev 19.06.00.022. > >Test plan: >Run dbrev. >Run t/db_dependent/Patron/Relationships.t >Run t/db_dependent/Koha/Patrons.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/bug_30472.pl | 13 +++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 14 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_30472.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30472.pl b/installer/data/mysql/atomicupdate/bug_30472.pl >new file mode 100755 >index 0000000000..9c35ccec5d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30472.pl >@@ -0,0 +1,13 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => 30472, >+ description => "borrower_relationships.guarantor_id NOT NULL", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ $dbh->do(q{ >+ALTER TABLE borrower_relationships CHANGE COLUMN guarantor_id guarantor_id int(11) NOT NULL >+ }); >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 7eafe84413..e732f652f8 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1371,7 +1371,7 @@ DROP TABLE IF EXISTS `borrower_relationships`; > /*!40101 SET character_set_client = utf8 */; > CREATE TABLE `borrower_relationships` ( > `id` int(11) NOT NULL AUTO_INCREMENT, >- `guarantor_id` int(11) DEFAULT NULL, >+ `guarantor_id` int(11) NOT NULL, > `guarantee_id` int(11) NOT NULL, > `relationship` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, > PRIMARY KEY (`id`), >-- >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 30472
:
139711
|
139972