From 67fb83d52554031f946709495112920fa2fc784c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 4 Feb 2013 08:16:58 -0500 Subject: [PATCH] Bug 7718 - Remove itemnumber column from serials table Remove the column 'itemnumber' from the table 'serial'. This is a 1 to many relationship, and this reference does not make sense. The 'serialitems' table handles the relationship between the 'items' table and the 'serial' table. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Verify serial.itemnumber has been removed from the database Signed-off-by: Bernardo Gonzalez Kriegel Column removed. No errors. Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- installer/data/mysql/kohastructure.sql | 1 - installer/data/mysql/updatedatabase.pl | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 7cea46ec9f..ca2f2b2b0b 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1900,7 +1900,6 @@ CREATE TABLE `serial` ( `planneddate` date default NULL, `notes` text, `publisheddate` date default NULL, - `itemnumber` text default NULL, `claimdate` date default NULL, `routingnotes` text, PRIMARY KEY (`serialid`) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e609f5b5b1..206dbd70ea 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6942,6 +6942,13 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion ="3.13.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("ALTER TABLE serial DROP itemnumber"); + print "Upgrade to $DBversion done (Bug 7718 - Remove itemnumber column from serials table)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 2.39.5