Bugzilla – Attachment 139972 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.92 KB, created by
Fridolin Somers
on 2022-08-30 06:19:22 UTC
(
hide
)
Description:
Bug 30472: Make borrower_relationships.guarantor_id not null
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2022-08-30 06:19:22 UTC
Size:
1.92 KB
patch
obsolete
>From c96ec13382bcb29c9f148219e641c88d32d359de 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 > >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> >Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> >--- > 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 affa80e9c2..afa73524e0 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1372,7 +1372,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.35.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 30472
:
139711
| 139972