From b47f0aa5fe875290a822db9d864179a782f24f4c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 2 Dec 2021 12:17:12 +0100 Subject: [PATCH] Bug 29605: account_offsets.type is not null Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_29605.pl | 11 ++++++++++- installer/data/mysql/db_revs/210600013.pl | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_29605.pl b/installer/data/mysql/atomicupdate/bug_29605.pl index a18e8ecccc..a6bbbb08de 100755 --- a/installer/data/mysql/atomicupdate/bug_29605.pl +++ b/installer/data/mysql/atomicupdate/bug_29605.pl @@ -32,8 +32,17 @@ return { ADD CONSTRAINT `tmp_holdsqueue_ibfk_3` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE }); - say $out "Added missing foreign key on tmp_holdsqueue" + say $out "Added missing foreign key on tmp_holdsqueue"; } + $dbh->do( + q{ + ALTER TABLE `account_offsets` + MODIFY COLUMN `type` enum( 'CREATE', 'APPLY', 'VOID', 'OVERDUE_INCREASE', 'OVERDUE_DECREASE' ) NOT NULL + } + ); + say $out "Ensure NOT NULL on account_offsets.type"; + }, + } diff --git a/installer/data/mysql/db_revs/210600013.pl b/installer/data/mysql/db_revs/210600013.pl index a8e52eaaf6..a7ab7e028e 100755 --- a/installer/data/mysql/db_revs/210600013.pl +++ b/installer/data/mysql/db_revs/210600013.pl @@ -34,7 +34,7 @@ return { 'VOID', 'OVERDUE_INCREASE', 'OVERDUE_DECREASE' - ) + ) NOT NULL AFTER `debit_id` } ); -- 2.34.1