From 16cad569c8275b0f7b32a587b0143f5533121796 Mon Sep 17 00:00:00 2001 From: Hammat Wele 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 WNC amended patch - tidied Signed-off-by: Owen Leonard Signed-off-by: Emmi Takkinen Signed-off-by: Nick Clemens --- installer/data/mysql/atomicupdate/bug_36466.pl | 18 ++++++++++++++++++ 1 file changed, 18 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 00000000000..68671054eea --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36466.pl @@ -0,0 +1,18 @@ +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.39.2