From be6a5684607c38dfd6b65b5e6659671e1d54bf33 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 17 Mar 2020 09:50:18 +0100 Subject: [PATCH] Bug 18177: DB changes Content-Type: text/plain; charset=utf-8 Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy --- installer/data/mysql/atomicupdate/bug_18177.perl | 15 +++++++++++++++ installer/data/mysql/kohastructure.sql | 7 +------ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_18177.perl diff --git a/installer/data/mysql/atomicupdate/bug_18177.perl b/installer/data/mysql/atomicupdate/bug_18177.perl new file mode 100644 index 0000000000..0426fda963 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_18177.perl @@ -0,0 +1,15 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + for my $column ( qw(othersupplier booksellerfax booksellerurl bookselleremail currency) ) { + if( column_exists( 'aqbooksellers', $column ) ) { + $dbh->do(qq| + ALTER TABLE aqbooksellers + DROP COLUMN $column + |); + } + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 18177 - Remove some unused columns from aqbooksellers)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index a7126a56ec..40dd796b9a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2783,13 +2783,8 @@ CREATE TABLE `aqbooksellers` ( -- information about the vendors listed in acquis `address3` LONGTEXT, -- third line of vendor physical address `address4` LONGTEXT, -- fourth line of vendor physical address `phone` varchar(30) default NULL, -- vendor phone number - `accountnumber` LONGTEXT, -- unused in Koha - `othersupplier` LONGTEXT, -- unused in Koha - `currency` varchar(10) NOT NULL default '', -- unused in Koha - `booksellerfax` LONGTEXT, -- vendor fax number + `accountnumber` LONGTEXT, -- vendor account number `notes` LONGTEXT, -- order notes - `bookselleremail` LONGTEXT, -- vendor email - `booksellerurl` LONGTEXT, -- unused in Koha `postal` LONGTEXT, -- vendor postal address (all lines) `url` varchar(255) default NULL, -- vendor web address `active` tinyint(4) default NULL, -- is this vendor active (1 for yes, 0 for no) -- 2.11.0