From 444d4d13a5e14f69545f34f57ff3daa1029e0a24 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 14 Oct 2014 11:21:15 +0200 Subject: [PATCH] Bug 13068: Follow-up for cleaning up atomicupdate folder Content-Type: text/plain; charset=utf-8 The folder atomicupdate can be cleaned up. It mainly contains old files that are not used any more. I found two files that are still referenced: [1] Bug-4246-Talking-Tech-itiva-phone-notifications.pl A readme file refers to it. The code in this file slightly differs from the TalkingTech db revision. It can probably be deleted too, but I will first check. [2] oai_sets.sql This file should remain. It is used in dbrev 3.07.00.029. Signed-off-by: Marcel de Rooy --- ...-permit_to_define_fine_days_in_issuing_rules.pl | 22 -------------- .../0004-Add_Some_Missing_fields_to_suggestions.pl | 22 -------------- .../atomicupdate/0005-Add_CAS_Configuration.pl | 8 ----- .../mysql/atomicupdate/0007-Opac-search-history.pl | 24 ---------------- .../0008-opac-description-for-authorised-values.pl | 7 ---- .../0009-patron-attr-display-checkout.pl | 7 ---- ...Renew_membership_from_expiry_or_current_date.pl | 9 ------ ...dd-returnbranch-to-branch-item-issuing-rules.pl | 20 ------------- .../atomicupdate/bug_7284_authority_linking_pt1 | 21 -------------- .../atomicupdate/bug_7284_authority_linking_pt2 | 9 ------ installer/data/mysql/atomicupdate/hourlyloans.sql | 1 - .../data/mysql/atomicupdate/importauthorities.pl | 26 ----------------- .../data/mysql/atomicupdate/issuedate_times.pl | 17 ----------- .../data/mysql/atomicupdate/local_cover_images.pl | 30 -------------------- .../mysql/atomicupdate/subscription_add_enddate.pl | 9 ------ 15 files changed, 0 insertions(+), 232 deletions(-) delete mode 100755 installer/data/mysql/atomicupdate/0001-bug_2929-permit_to_define_fine_days_in_issuing_rules.pl delete mode 100755 installer/data/mysql/atomicupdate/0004-Add_Some_Missing_fields_to_suggestions.pl delete mode 100755 installer/data/mysql/atomicupdate/0005-Add_CAS_Configuration.pl delete mode 100755 installer/data/mysql/atomicupdate/0007-Opac-search-history.pl delete mode 100755 installer/data/mysql/atomicupdate/0008-opac-description-for-authorised-values.pl delete mode 100644 installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl delete mode 100755 installer/data/mysql/atomicupdate/bug_6843_Renew_membership_from_expiry_or_current_date.pl delete mode 100644 installer/data/mysql/atomicupdate/bug_7144-add-returnbranch-to-branch-item-issuing-rules.pl delete mode 100644 installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt1 delete mode 100755 installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt2 delete mode 100644 installer/data/mysql/atomicupdate/hourlyloans.sql delete mode 100755 installer/data/mysql/atomicupdate/importauthorities.pl delete mode 100644 installer/data/mysql/atomicupdate/issuedate_times.pl delete mode 100755 installer/data/mysql/atomicupdate/local_cover_images.pl delete mode 100755 installer/data/mysql/atomicupdate/subscription_add_enddate.pl diff --git a/installer/data/mysql/atomicupdate/0001-bug_2929-permit_to_define_fine_days_in_issuing_rules.pl b/installer/data/mysql/atomicupdate/0001-bug_2929-permit_to_define_fine_days_in_issuing_rules.pl deleted file mode 100755 index 94a2006..0000000 --- a/installer/data/mysql/atomicupdate/0001-bug_2929-permit_to_define_fine_days_in_issuing_rules.pl +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/perl -use strict; -use warnings; -use C4::Context; -my $dbh=C4::Context->dbh; -$dbh->do("ALTER TABLE issuingrules ADD - COLUMN `finedays` int(11) default NULL AFTER `fine`, - COLUMN `renewalsallowed` smallint(6) default NULL, - COLUMN `reservesallowed` smallint(6) default NULL, - "); -my $sth = $dbh->prepare("SELECT itemtype, renewalsallowed FROM itemtypes"); -$sth->execute(); - -my $sthupd = $dbh->prepare("UPDATE issuingrules SET renewalsallowed = ? WHERE itemtype = ?"); - -while(my $row = $sth->fetchrow_hashref){ - $sthupd->execute($row->{renewalsallowed}, $row->{itemtype}); -} - -$dbh->do('ALTER TABLE itemtypes DROP COLUMN `renewalsallowed`;'); - -print "Upgrade done (Adding finedays renewalsallowed, and reservesallowed fields in issuingrules table)\n"; diff --git a/installer/data/mysql/atomicupdate/0004-Add_Some_Missing_fields_to_suggestions.pl b/installer/data/mysql/atomicupdate/0004-Add_Some_Missing_fields_to_suggestions.pl deleted file mode 100755 index 8e3edad..0000000 --- a/installer/data/mysql/atomicupdate/0004-Add_Some_Missing_fields_to_suggestions.pl +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; -use C4::Context; -my $dbh=C4::Context->dbh; -$dbh->do(<dbh; - -$dbh->do("INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('casAuthentication', '1', '', 'Enable or disable CAS authentication', 'YesNo'), ('casLogout', '1', '', 'Does a logout from Koha should also log out of CAS ?', 'YesNo'), ('casServerUrl', 'https://localhost:8443/cas', '', 'URL of the cas server', 'Free')"); -print "Upgrade done (added CAS authentication system preferences)\n"; diff --git a/installer/data/mysql/atomicupdate/0007-Opac-search-history.pl b/installer/data/mysql/atomicupdate/0007-Opac-search-history.pl deleted file mode 100755 index b41796b..0000000 --- a/installer/data/mysql/atomicupdate/0007-Opac-search-history.pl +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/perl -use strict; -use warnings; -use C4::Context; -my $dbh=C4::Context->dbh; - -$dbh->do("INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('EnableOpacSearchHistory', '1', '', 'Enable or disable opac search history', 'YesNo')"); - -my $create = <do($create); - -print "Upgrade done (added OPAC search history preference and table)\n"; diff --git a/installer/data/mysql/atomicupdate/0008-opac-description-for-authorised-values.pl b/installer/data/mysql/atomicupdate/0008-opac-description-for-authorised-values.pl deleted file mode 100755 index b5347f4..0000000 --- a/installer/data/mysql/atomicupdate/0008-opac-description-for-authorised-values.pl +++ /dev/null @@ -1,7 +0,0 @@ -#! /usr/bin/perl -use strict; -use warnings; -use C4::Context; -my $dbh=C4::Context->dbh; -$dbh->do("ALTER TABLE authorised_values ADD COLUMN `lib_opac` VARCHAR(80) default NULL AFTER `lib`"); -print "Upgrade done (Added a lib_opac field in authorised_values table)\n"; diff --git a/installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl b/installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl deleted file mode 100644 index 44cfcfa..0000000 --- a/installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl +++ /dev/null @@ -1,7 +0,0 @@ -#! /usr/bin/perl -use strict; -use warnings; -use C4::Context; -my $dbh=C4::Context->dbh; -$dbh->do("ALTER TABLE borrower_attribute_types ADD COLUMN `display_checkout` TINYINT(1) NOT NULL DEFAULT '0';"); -print "Upgrade done (Added a display_checkout field in borrower_attribute_types table)\n"; diff --git a/installer/data/mysql/atomicupdate/bug_6843_Renew_membership_from_expiry_or_current_date.pl b/installer/data/mysql/atomicupdate/bug_6843_Renew_membership_from_expiry_or_current_date.pl deleted file mode 100755 index bffd857..0000000 --- a/installer/data/mysql/atomicupdate/bug_6843_Renew_membership_from_expiry_or_current_date.pl +++ /dev/null @@ -1,9 +0,0 @@ -#! /usr/bin/perl -use strict; -use warnings; -use C4::Context; -my $dbh=C4::Context->dbh; -$dbh->do(<dbh; - -$dbh->do("ALTER TABLE default_circ_rules ADD - COLUMN `returnbranch` varchar(15) default NULL AFTER `holdallowed`"); -$dbh->do("ALTER TABLE branch_item_rules ADD - COLUMN `returnbranch` varchar(15) default NULL AFTER `holdallowed`"); -$dbh->do("ALTER TABLE default_branch_circ_rules ADD - COLUMN `returnbranch` varchar(15) default NULL AFTER `holdallowed`"); -$dbh->do("ALTER TABLE default_branch_item_rules ADD - COLUMN `returnbranch` varchar(15) default NULL AFTER `holdallowed`"); - -# set the default rule to the current value of HomeOrHoldingBranchReturn (default to 'homebranch' if need be) -my $homeorholdingbranchreturn = C4::Context->prefernce('HomeOrHoldingBranchReturn') || 'homebranch'; -$dbh->do("UPDATE default_circ_rules SET returnbranch = '$homeorholdingbranchreturn'"); - -print "Upgrade done (Adding 'returnbranch' to branch/item issuing rules tables)\n"; diff --git a/installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt1 b/installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt1 deleted file mode 100644 index c8a1f42..0000000 --- a/installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt1 +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/perl -use strict; -use warnings; -use C4::Context; -my $dbh = C4::Context->dbh; -$dbh->do( -"INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerModule','Default','Chooses which linker module to use (see documentation).','Default|FirstMatchLastMatch','Choice');" -); -$dbh->do( -"INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerOptions','','A pipe-separated list of options for the linker.','','free');" -); -$dbh->do( -"INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerRelink',1,'If ON the authority linker will relink headings that have previously been linked every time it runs.',NULL,'YesNo');" -); -$dbh->do( -"INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerKeepStale',0,'If ON the authority linker will keep existing authority links for headings where it is unable to find a match.',NULL,'YesNo');" -); -$dbh->do( -"INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AutoCreateAuthorities',0,'Automatically create authorities that do not exist when cataloging records.',NULL,'YesNo');" -); -print "Upgrade done (Configured bug 7284, improved authority matching)\n"; diff --git a/installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt2 b/installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt2 deleted file mode 100755 index 6c2bdfb..0000000 --- a/installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt2 +++ /dev/null @@ -1,9 +0,0 @@ -#! /usr/bin/perl -use strict; -use warnings; -use C4::Context; -my $dbh = C4::Context->dbh; -$dbh->do( -"INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CatalogModuleRelink',0,'If OFF the linker will never replace the authids that are set in the cataloging module.',NULL,'YesNo');" -); -print "Upgrade done (Configured bug 7284, added the )\n"; diff --git a/installer/data/mysql/atomicupdate/hourlyloans.sql b/installer/data/mysql/atomicupdate/hourlyloans.sql deleted file mode 100644 index 664142d..0000000 --- a/installer/data/mysql/atomicupdate/hourlyloans.sql +++ /dev/null @@ -1 +0,0 @@ -alter table issuingrules add column lengthunit varchar(10) default 'days' after issuelength; diff --git a/installer/data/mysql/atomicupdate/importauthorities.pl b/installer/data/mysql/atomicupdate/importauthorities.pl deleted file mode 100755 index 679235e..0000000 --- a/installer/data/mysql/atomicupdate/importauthorities.pl +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; -use C4::Context; -my $dbh = C4::Context->dbh; - -$dbh->do( -q|CREATE TABLE `import_auths` ( - import_record_id int(11) NOT NULL, - matched_authid int(11) default NULL, - control_number varchar(25) default NULL, - authorized_heading varchar(128) default NULL, - original_source varchar(25) default NULL, - CONSTRAINT import_auths_ibfk_1 FOREIGN KEY (import_record_id) - REFERENCES import_records (import_record_id) ON DELETE CASCADE ON UPDATE CASCADE, - KEY matched_authid (matched_authid) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8;| -); -$dbh->do("ALTER TABLE import_batches - CHANGE COLUMN num_biblios num_records int(11) NOT NULL default 0, - ADD COLUMN record_type enum('biblio', 'auth', 'holdings') NOT NULL default 'biblio'"); -$dbh->do("UPDATE import_batches SET record_type='auth' WHERE import_batch_id IN - (SELECT import_batch_id FROM import_records WHERE record_type='auth')"); - -print "Upgrade done (Added support for staging authorities)\n"; diff --git a/installer/data/mysql/atomicupdate/issuedate_times.pl b/installer/data/mysql/atomicupdate/issuedate_times.pl deleted file mode 100644 index 864109a..0000000 --- a/installer/data/mysql/atomicupdate/issuedate_times.pl +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; -use C4::Context; - -my $dbh = C4::Context->dbh; - -$dbh->do("ALTER TABLE issues CHANGE date_due date_due datetime"); -$dbh->do("ALTER TABLE issues CHANGE returndate returndate datetime"); -$dbh->do("ALTER TABLE issues CHANGE lastreneweddate lastreneweddate datetime"); -$dbh->do("ALTER TABLE issues CHANGE issuedate issuedate datetime"); -$dbh->do("ALTER TABLE old_issues CHANGE date_due date_due datetime"); -$dbh->do("ALTER TABLE old_issues CHANGE returndate returndate datetime"); -$dbh->do("ALTER TABLE old_issues CHANGE lastreneweddate lastreneweddate datetime"); -$dbh->do("ALTER TABLE old_issues CHANGE issuedate issuedate datetime"); -$dbh->do(q{update issues set date_due = addtime(date_due, '0 23:0:0') where hour(date_due) = 0}); diff --git a/installer/data/mysql/atomicupdate/local_cover_images.pl b/installer/data/mysql/atomicupdate/local_cover_images.pl deleted file mode 100755 index 6a804fe..0000000 --- a/installer/data/mysql/atomicupdate/local_cover_images.pl +++ /dev/null @@ -1,30 +0,0 @@ -#! /usr/bin/perl -use strict; -use warnings; -use C4::Context; -my $dbh = C4::Context->dbh; - -$dbh->do( - q|CREATE TABLE `biblioimages` ( - `imagenumber` int(11) NOT NULL AUTO_INCREMENT, - `biblionumber` int(11) NOT NULL, - `mimetype` varchar(15) NOT NULL, - `imagefile` mediumblob NOT NULL, - `thumbnail` mediumblob NOT NULL, - PRIMARY KEY (`imagenumber`), - CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8| -); -$dbh->do( -q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACLocalCoverImages','0','Display local cover images on OPAC search and details pages.','1','YesNo')| -); -$dbh->do( -q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('LocalCoverImages','0','Display local cover images on intranet search and details pages.','1','YesNo')| -); -$dbh->do( -q|INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowMultipleCovers','0','Allow multiple cover images to be attached to each bibliographic record.','1','YesNo')| -); -$dbh->do( -q|INSERT INTO permissions (module_bit, code, description) VALUES (13, 'upload_local_cover_images', 'Upload local cover images')| -); -print "Upgrade done (Added support for local cover images)\n"; diff --git a/installer/data/mysql/atomicupdate/subscription_add_enddate.pl b/installer/data/mysql/atomicupdate/subscription_add_enddate.pl deleted file mode 100755 index b8074b1..0000000 --- a/installer/data/mysql/atomicupdate/subscription_add_enddate.pl +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/perl -#use strict; -#use warnings; FIXME - Bug 2505 -use C4::Context; -my $dbh=C4::Context->dbh; -$dbh->do("ALTER TABLE `subscription` ADD `enddate` date default NULL"); -$dbh->do("ALTER TABLE subscriptionhistory CHANGE enddate histenddate DATE default NULL"); -print "Upgrade to $DBversion done ( Adding enddate to subscription)\n"; - -- 1.7.7.6