From bbbf600bbdea2e95ca924a8749c54dbb1fc495a4 Mon Sep 17 00:00:00 2001
From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Date: Fri, 17 Apr 2020 08:04:14 +0000
Subject: [PATCH] Bug 21901: (QA follow-up) Add a few NOT NULL constraints in
 dbrev
Content-Type: text/plain; charset=utf-8

We need to specify NOT NULL on subscription and -history as well.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
---
 installer/data/mysql/atomicupdate/bug_21901.perl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/installer/data/mysql/atomicupdate/bug_21901.perl b/installer/data/mysql/atomicupdate/bug_21901.perl
index e319f71a81..fb11d77bdd 100644
--- a/installer/data/mysql/atomicupdate/bug_21901.perl
+++ b/installer/data/mysql/atomicupdate/bug_21901.perl
@@ -72,8 +72,8 @@ if( CheckVersion( $DBversion ) ) {
 
     $dbh->do(q|
         ALTER TABLE subscriptionhistory
-        MODIFY COLUMN biblionumber int(11),
-        MODIFY COLUMN subscriptionid int(11)
+        MODIFY COLUMN biblionumber int(11) NOT NULL,
+        MODIFY COLUMN subscriptionid int(11) NOT NULL
     |);
 
     unless ( foreign_key_exists( 'subscriptionhistory', 'subscription_history_ibfk_1' ) ) {
@@ -98,7 +98,7 @@ if( CheckVersion( $DBversion ) ) {
 
     $dbh->do(q|
         ALTER TABLE subscription
-        MODIFY COLUMN biblionumber int(11)
+        MODIFY COLUMN biblionumber int(11) NOT NULL
     |);
 
     unless ( foreign_key_exists( 'subscription', 'subscription_ibfk_3' ) ) {
-- 
2.11.0