From e6859a3f814a88785c161b3a424b46573df5e053 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Sun, 27 Jan 2008 13:17:29 -0600 Subject: [PATCH] minor db update changes for 2.2->3.0 script Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- installer/data/mysql/update22to30.pl | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/installer/data/mysql/update22to30.pl b/installer/data/mysql/update22to30.pl index baf17e22c8..ab18926e7d 100755 --- a/installer/data/mysql/update22to30.pl +++ b/installer/data/mysql/update22to30.pl @@ -847,6 +847,38 @@ my $DBversion = "3.00.00.000"; }, ], + biblio => [ + { + field => 'datecreated', + type => 'date', + null => 'NOT NULL', + default => '', + extra => '', + }, + { + field => 'frameworkcode', + type => 'varchar(4)', + null => 'NULL', + default => '', + extra => '', + }, + ], + deletedbiblio => [ + { + field => 'datecreated', + type => 'date', + null => 'NOT NULL', + default => '', + extra => '', + }, + { + field => 'frameworkcode', + type => 'varchar(4)', + null => 'NULL', + default => '', + extra => '', + }, + ], deletedbiblioitems => [ { field => 'itemtype', @@ -1983,6 +2015,12 @@ my $DBversion = "3.00.00.000"; print "Updating publisheddate\n"; $dbh->do("update serial set publisheddate=planneddate where publisheddate is NULL"); } + # Why are we setting publisheddate = planneddate ?? if we don't have the data, we don't know it. + # now, let's get rid of 000-00-00's. + + $dbh->do("update serial set publisheddate=NULL where publisheddate = 0"); + $dbh->do("update subscription set firstacquidate=startdate where firstacquidate = 0"); + foreach my $table ( keys %tabledata ) { print "Checking for data required in table $table...\n" unless $silent; my $tablerows = $tabledata{$table}; -- 2.39.2