From 143e4656ff8e17ee86e025225999c8c53eb90d0d 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. Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Passes tests, updates kohastructure and includes a database update. Also made some tests in the suggestions module. --- installer/data/mysql/kohastructure.sql | 1 - .../mysql/ru-RU/optional/sample_user_suggestions.sql | 4 ++-- .../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 2cedc938d3..09ef8d3d30 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2198,7 +2198,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 4cf26750f1..170c8e174a 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 5b5a1f1c76..f676343429 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 a203684df3..ede6736a07 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10000,6 +10000,15 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = '3.19.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); +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5