@@ -, +, @@ --- 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 --- a/installer/data/mysql/atomicupdate/bug_30472.pl +++ a/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 + }); + }, +}; --- a/installer/data/mysql/kohastructure.sql +++ a/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`), --