From 063204b46e36c5b84f18b8e1120e9eb207a93f77 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 29 Sep 2014 15:54:34 +0200 Subject: [PATCH] Bug 13006: suggestions.mailoverseeing cans be removed The DB field suggestions.mailoverseeing does not seem to be in used. It cans be removed. Actually it has never been in used. Test plan: git grep mailoverseeing should not return relevant results. --- installer/data/mysql/kohastructure.sql | 1 - installer/data/mysql/ru-RU/optional/sample_user_suggestions.sql | 4 ++-- installer/data/mysql/uk-UA/optional/sample_user_suggestions.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 9 +++++++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index aeeba17..f2bca0a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2169,7 +2169,6 @@ CREATE TABLE `suggestions` ( -- purchase suggestions `publicationyear` smallint(6) default 0, `place` varchar(255) default NULL, -- publication place of the suggested item `isbn` varchar(30) default NULL, -- isbn of the suggested item - `mailoverseeing` smallint(1) default 0, `biblionumber` int(11) default NULL, -- foreign key linking the suggestion to the biblio table after the suggestion has been ordered `reason` text, -- reason for accepting or rejecting the suggestion `patronreason` text, -- reason for making the suggestion diff --git a/installer/data/mysql/ru-RU/optional/sample_user_suggestions.sql b/installer/data/mysql/ru-RU/optional/sample_user_suggestions.sql index 4cf2675..ab2dd3a 100644 --- a/installer/data/mysql/ru-RU/optional/sample_user_suggestions.sql +++ b/installer/data/mysql/ru-RU/optional/sample_user_suggestions.sql @@ -1,4 +1,4 @@ TRUNCATE suggestions; -INSERT INTO `suggestions` (`suggestionid`, `suggestedby`, `managedby`, `STATUS`, `note`, `author`, `title`, `copyrightdate`, `publishercode`, `date`, `volumedesc`, `publicationyear`, `place`, `isbn`, `mailoverseeing`, `biblionumber`, `reason`) -VALUES (1,0,NULL,'ASKED','нужна для УКЕ','','Мифы нашего времени',2008,'Часы','2008-05-01 08:02:26',NULL,NULL,NULL,NULL,0,0,NULL); +INSERT INTO `suggestions` (`suggestionid`, `suggestedby`, `managedby`, `STATUS`, `note`, `author`, `title`, `copyrightdate`, `publishercode`, `date`, `volumedesc`, `publicationyear`, `place`, `isbn`, `biblionumber`, `reason`) +VALUES (1,0,NULL,'ASKED','нужна для УКЕ','','Мифы нашего времени',2008,'Часы','2008-05-01 08:02:26',NULL,NULL,NULL,NULL,0,NULL); diff --git a/installer/data/mysql/uk-UA/optional/sample_user_suggestions.sql b/installer/data/mysql/uk-UA/optional/sample_user_suggestions.sql index 5b5a1f1..38520d8 100644 --- a/installer/data/mysql/uk-UA/optional/sample_user_suggestions.sql +++ b/installer/data/mysql/uk-UA/optional/sample_user_suggestions.sql @@ -1,4 +1,4 @@ TRUNCATE suggestions; -INSERT INTO `suggestions` (`suggestionid`, `suggestedby`, `managedby`, `STATUS`, `note`, `author`, `title`, `copyrightdate`, `publishercode`, `date`, `volumedesc`, `publicationyear`, `place`, `isbn`, `mailoverseeing`, `biblionumber`, `reason`) -VALUES (1,0,NULL,'ASKED','потрібна для УКЕ','','Міфи нашого часу',2008,'Час','2008-05-01 08:02:26',NULL,NULL,NULL,NULL,0,0,NULL); +INSERT INTO `suggestions` (`suggestionid`, `suggestedby`, `managedby`, `STATUS`, `note`, `author`, `title`, `copyrightdate`, `publishercode`, `date`, `volumedesc`, `publicationyear`, `place`, `isbn`, `biblionumber`, `reason`) +VALUES (1,0,NULL,'ASKED','потрібна для УКЕ','','Міфи нашого часу',2008,'Час','2008-05-01 08:02:26',NULL,NULL,NULL,NULL,0,NULL); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6ea5911..ea2460b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8781,6 +8781,15 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } + +$DBversion = '3.17.00.XXX'; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + ALTER TABLE suggestions DROP COLUMN mailoverseeing; + }); + print "Upgrade to $DBversion done (Bug 13006: Drop column suggestion.mailoverseeing)"; + SetVersion($DBversion); +} =head1 FUNCTIONS =head2 TableExists($table) -- 2.1.0