From 015338b998e1e4e6c080489b565433bc91e6bd7a Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Thu, 13 Mar 2008 17:18:03 -0500 Subject: [PATCH] Correcting column order in items/deleteditems tables Signed-off-by: Joshua Ferraro --- installer/data/mysql/kohastructure.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 2dcce90055..81e07f3355 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -837,9 +837,9 @@ CREATE TABLE `deleteditems` ( `uri` varchar(255) default NULL, `itype` varchar(10) default NULL, `more_subfields_xml` longtext default NULL, - `marc` longblob, - `copynumber` smallint(6) default NULL, `enumchron` varchar(80) default NULL, + `copynumber` smallint(6) default NULL, + `marc` longblob, PRIMARY KEY (`itemnumber`), KEY `delitembarcodeidx` (`barcode`), KEY `delitembinoidx` (`biblioitemnumber`), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e3d95d2752..a82c0f96de 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -1178,12 +1178,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = "3.00.00.063"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do("ALTER TABLE deleteditems - CHANGE COLUMN booksellerid booksellerid MEDIUMTEXT, - ADD COLUMN copynumber SMALLINT(6) DEFAULT NULL, - ADD COLUMN enumchron VARCHAR(80) DEFAULT NULL;"); + CHANGE COLUMN booksellerid booksellerid MEDIUMTEXT DEFAULT NULL, + ADD COLUMN enumchron VARCHAR(80) DEFAULT NULL AFTER more_subfields_xml, + ADD COLUMN copynumber SMALLINT(6) DEFAULT NULL AFTER enumchron;"); $dbh->do("ALTER TABLE items CHANGE COLUMN booksellerid booksellerid MEDIUMTEXT, - ADD COLUMN copynumber SMALLINT(6);"); + ADD COLUMN copynumber SMALLINT(6) DEFAULT NULL AFTER enumchron;"); print "Upgrade to $DBversion done ( Changed items.booksellerid and deleteditems.booksellerid to MEDIUMTEXT and added missing items.copynumber and deleteditems.copynumber to fix Bug 1927)\n"; SetVersion ($DBversion); } -- 2.39.5