From c58ee2a57c3ca954b4dd1f09fa8ad916b4e8f1ae Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 2 Dec 2021 12:37:33 +0100 Subject: [PATCH] Bug 29605: search_marc_map.marc_type NOT NULL was missing when MODIFY --- installer/data/mysql/atomicupdate/bug_29605.pl | 3 +++ installer/data/mysql/db_revs/210600031.pl | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_29605.pl b/installer/data/mysql/atomicupdate/bug_29605.pl index d07fc1f9a37..c1febb47178 100755 --- a/installer/data/mysql/atomicupdate/bug_29605.pl +++ b/installer/data/mysql/atomicupdate/bug_29605.pl @@ -59,6 +59,9 @@ return { ); say $out "Ensure additional_contents.lang is VARCHAR(50)"; + $dbh->do(q{ALTER TABLE search_marc_map MODIFY `marc_type` enum('marc21','unimarc') NOT NULL COMMENT 'what MARC type this map is for'}); + say $out "Ensure NOT NULL on search_marc_map.marc_type"; + }, } diff --git a/installer/data/mysql/db_revs/210600031.pl b/installer/data/mysql/db_revs/210600031.pl index 5c92ad73130..c62450925f8 100755 --- a/installer/data/mysql/db_revs/210600031.pl +++ b/installer/data/mysql/db_revs/210600031.pl @@ -7,6 +7,6 @@ return { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; $dbh->do(q{DELETE FROM search_marc_map WHERE marc_type='normarc'}); - $dbh->do(q{ALTER TABLE search_marc_map MODIFY `marc_type` enum('marc21','unimarc') COMMENT 'what MARC type this map is for'}); + $dbh->do(q{ALTER TABLE search_marc_map MODIFY `marc_type` enum('marc21','unimarc') NOT NULL COMMENT 'what MARC type this map is for'}); }, } -- 2.25.1