Bug 13068: Follow-up for cleaning up atomicupdate folder
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 14 Oct 2014 09:21:15 +0000 (11:21 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 31 Mar 2015 14:30:54 +0000 (11:30 -0300)
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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
15 files changed:
installer/data/mysql/atomicupdate/0001-bug_2929-permit_to_define_fine_days_in_issuing_rules.pl [deleted file]
installer/data/mysql/atomicupdate/0004-Add_Some_Missing_fields_to_suggestions.pl [deleted file]
installer/data/mysql/atomicupdate/0005-Add_CAS_Configuration.pl [deleted file]
installer/data/mysql/atomicupdate/0007-Opac-search-history.pl [deleted file]
installer/data/mysql/atomicupdate/0008-opac-description-for-authorised-values.pl [deleted file]
installer/data/mysql/atomicupdate/0009-patron-attr-display-checkout.pl [deleted file]
installer/data/mysql/atomicupdate/bug_6843_Renew_membership_from_expiry_or_current_date.pl [deleted file]
installer/data/mysql/atomicupdate/bug_7144-add-returnbranch-to-branch-item-issuing-rules.pl [deleted file]
installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt1 [deleted file]
installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt2 [deleted file]
installer/data/mysql/atomicupdate/hourlyloans.sql [deleted file]
installer/data/mysql/atomicupdate/importauthorities.pl [deleted file]
installer/data/mysql/atomicupdate/issuedate_times.pl [deleted file]
installer/data/mysql/atomicupdate/local_cover_images.pl [deleted file]
installer/data/mysql/atomicupdate/subscription_add_enddate.pl [deleted file]

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 (executable)
index 94a2006..0000000
+++ /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 (executable)
index 8e3edad..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/perl
-use strict;
-use warnings;
-use C4::Context;
-my $dbh=C4::Context->dbh;
-$dbh->do(<<SUGGESTIONS);
-ALTER table suggestions 
-    ADD budgetid INT(11),
-    ADD branchcode VARCHAR(10) default NULL,
-    ADD acceptedby INT(11) default NULL,
-    ADD acceptedon date default NULL,
-    ADD suggestedon date default NULL,
-    ADD managedon date default NULL,
-    ADD rejectedby INT(11) default NULL,
-    ADD rejectedon date default NULL,
-    ADD collectiontitle text default NULL,
-    ADD itemtype VARCHAR(30) default NULL,
-    ADD sort1 VARCHAR(80) default NULL,
-    ADD sort2 VARCHAR(80) default NULL
-    ;
-SUGGESTIONS
-print "Add some fields to suggestions";
diff --git a/installer/data/mysql/atomicupdate/0005-Add_CAS_Configuration.pl b/installer/data/mysql/atomicupdate/0005-Add_CAS_Configuration.pl
deleted file mode 100755 (executable)
index f12c5e4..0000000
+++ /dev/null
@@ -1,8 +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 ('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 (executable)
index b41796b..0000000
+++ /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 = <<END;
-CREATE TABLE IF NOT EXISTS `search_history` (
-  `userid` int(11) NOT NULL,
-  `sessionid` varchar(32) NOT NULL,
-  `query_desc` varchar(255) NOT NULL,
-  `query_cgi` varchar(255) NOT NULL,
-  `total` int(11) NOT NULL,
-  `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
-  KEY `userid` (`userid`),
-  KEY `sessionid` (`sessionid`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Opac search history results';
-END
-
-$dbh->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 (executable)
index b5347f4..0000000
+++ /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 (file)
index 44cfcfa..0000000
+++ /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 (executable)
index bffd857..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /usr/bin/perl
-use strict;
-use warnings;
-use C4::Context;
-my $dbh=C4::Context->dbh;
-$dbh->do(<<ENDOFRENEWAL);
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
-ENDOFRENEWAL
-print "Upgrade done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
diff --git a/installer/data/mysql/atomicupdate/bug_7144-add-returnbranch-to-branch-item-issuing-rules.pl b/installer/data/mysql/atomicupdate/bug_7144-add-returnbranch-to-branch-item-issuing-rules.pl
deleted file mode 100644 (file)
index 7b1e3b6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /usr/bin/perl
-use strict;
-use warnings;
-use C4::Context;
-my $dbh=C4::Context->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 (file)
index c8a1f42..0000000
+++ /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 (executable)
index 6c2bdfb..0000000
+++ /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 (file)
index 664142d..0000000
+++ /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 (executable)
index 679235e..0000000
+++ /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 (file)
index 864109a..0000000
+++ /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 (executable)
index 6a804fe..0000000
+++ /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 (executable)
index b8074b1..0000000
+++ /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";
-