From 4efeffe68ae6b5f6d50db7ac2142a627e7ee3696 Mon Sep 17 00:00:00 2001
From: Hammat Wele <hammat.wele@inlibro.com>
Date: Fri, 29 Mar 2024 22:14:08 +0000
Subject: [PATCH] Bug 36466: (follow-up) Adding atomicupdate file to fix
 0000-00-00 in serial table

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
---
 installer/data/mysql/atomicupdate/bug_36466.pl | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100755 installer/data/mysql/atomicupdate/bug_36466.pl

diff --git a/installer/data/mysql/atomicupdate/bug_36466.pl b/installer/data/mysql/atomicupdate/bug_36466.pl
new file mode 100755
index 0000000000..2c1aa6b93d
--- /dev/null
+++ b/installer/data/mysql/atomicupdate/bug_36466.pl
@@ -0,0 +1,16 @@
+use Modern::Perl;
+
+return {
+    bug_number => "36466",
+    description => "Fix the incorrect 0000-00-00 date in planneddate and publisheddate field",
+    up => sub {
+        my ($args) = @_;
+        my ($dbh, $out) = @$args{qw(dbh out)};
+        # Do you stuffs here
+        $dbh->do(q{update serial set planneddate=null where planneddate='0000-00-00';});
+        $dbh->do(q{update serial set publisheddate=null where publisheddate='0000-00-00';});
+        # Print useful stuff here
+        # sysprefs
+        say $out "incorrect date inplanneddate and publisheddate fixed";
+    },
+};
-- 
2.30.2