Bug 18984: DB changes
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 6 Oct 2021 15:00:07 +0000 (17:00 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Oct 2021 13:36:40 +0000 (15:36 +0200)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
installer/data/mysql/atomicupdate/bug_18984.pl [new file with mode: 0755]

diff --git a/installer/data/mysql/atomicupdate/bug_18984.pl b/installer/data/mysql/atomicupdate/bug_18984.pl
new file mode 100755 (executable)
index 0000000..5c92ad7
--- /dev/null
@@ -0,0 +1,12 @@
+use Modern::Perl;
+
+return {
+    bug_number => "18984",
+    description => "Remove NORMARC from search_marc_map.marc_type",
+    up => sub {
+        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'});
+    },
+}