From 6764b2530e153096d5e655ed8a22470ee47a6330 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Tue, 21 Apr 2015 10:46:05 +0200 Subject: [PATCH 1/2] Resources Enhancements: Add documentation and SQL update. --- install/manual_upgrade_1_3.txt | 3 +++ install/protected/update_1.3.sql | 14 ++++++++++++++ install/update_resources_enhancements.sql | 13 ------------- 3 files changed, 17 insertions(+), 13 deletions(-) delete mode 100644 install/update_resources_enhancements.sql diff --git a/install/manual_upgrade_1_3.txt b/install/manual_upgrade_1_3.txt index 49ca0c2..b990f12 100644 --- a/install/manual_upgrade_1_3.txt +++ b/install/manual_upgrade_1_3.txt @@ -18,3 +18,6 @@ Update the database schema Update /admin/configuration.ini -Add a line reading "enhancedCostHistory=Y" within the [settings] section in /admin/configuration.ini if you wish to use the new cost history features + -Add a line reading importISBNDedupingColumns="column1,column2[...]" within the [settings] section in /admin/configuration.ini if you wish to use the new import tool. + Those are columns names from the imported CSV file which will be used for matching against already existing Isbn's in Coral. + Example: importISBNDedupingColumns="ISSN,EISSN,PrintISSN,OnlineISSN,Print ISSN,Online ISSN,ISBN,EISBN" diff --git a/install/protected/update_1.3.sql b/install/protected/update_1.3.sql index 29f2796..cf16d22 100644 --- a/install/protected/update_1.3.sql +++ b/install/protected/update_1.3.sql @@ -28,3 +28,17 @@ ALTER TABLE `_DATABASE_NAME_`.`CostDetails` ADD INDEX `costDetailsID`(`costDetailsID`), ADD INDEX `Index_shortName`(`shortName`), ADD INDEX `Index_All`(`costDetailsID`, `shortName`); + +CREATE TABLE `IsbnOrIssn` ( + `isbnOrIssnID` int(11) NOT NULL auto_increment, + `resourceID` int(11) default NULL, + `isbnOrIssn` varchar(45) NOT NULL, + PRIMARY KEY (`isbnOrIssnID`), + KEY `resourceID` (`resourceID`), + KEY `isbnOrIssn` (`isbnOrIssn`) +) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; + +INSERT INTO IsbnOrIssn (resourceID, isbnOrIssn) SELECT resourceID, isbnOrIssn FROM Resource; + +ALTER TABLE `Resource` DROP `isbnOrISSN`; + diff --git a/install/update_resources_enhancements.sql b/install/update_resources_enhancements.sql deleted file mode 100644 index 7ab1a33..0000000 --- a/install/update_resources_enhancements.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE `IsbnOrIssn` ( - `isbnOrIssnID` int(11) NOT NULL auto_increment, - `resourceID` int(11) default NULL, - `isbnOrIssn` varchar(45) NOT NULL, - PRIMARY KEY (`isbnOrIssnID`), - KEY `resourceID` (`resourceID`), - KEY `isbnOrIssn` (`isbnOrIssn`) -) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; - -INSERT INTO IsbnOrIssn (resourceID, isbnOrIssn) SELECT resourceID, isbnOrIssn FROM Resource; - -ALTER TABLE `Resource` DROP `isbnOrISSN`; - From c61314e653b3ef5e091c0debd1238dd038f53e33 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Tue, 21 Apr 2015 13:38:45 +0200 Subject: [PATCH 2/2] Resources Enhancements: Fix database scheme for fresh install. --- install/protected/install.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/protected/install.sql b/install/protected/install.sql index 37b6044..473fda9 100644 --- a/install/protected/install.sql +++ b/install/protected/install.sql @@ -600,14 +600,13 @@ ALTER TABLE `_DATABASE_NAME_`.`Alias` ADD INDEX `Index_resourceID`(`resourceID`) ALTER TABLE `_DATABASE_NAME_`.`Resource` ADD INDEX `Index_createDate`(`createDate`), ADD INDEX `Index_createLoginID`(`createLoginID`), ADD INDEX `Index_titleText`(`titleText`), - ADD INDEX `Index_isbnOrISSN`(`isbnOrISSN`), ADD INDEX `Index_statusID`(`statusID`), ADD INDEX `Index_resourceTypeID`(`resourceTypeID`), ADD INDEX `Index_resourceFormatID`(`resourceFormatID`), ADD INDEX `Index_acquisitionTypeID`(`authenticationTypeID`), ADD INDEX `catalogingTypeID` ( `catalogingTypeID` ), ADD INDEX `catalogingStatusID` ( `catalogingStatusID` ), - ADD INDEX `Index_All`(`createDate`, `createLoginID`, `titleText`, `isbnOrISSN`, `statusID`, `resourceTypeID`, `resourceFormatID`, `acquisitionTypeID`); + ADD INDEX `Index_All`(`createDate`, `createLoginID`, `titleText`, `statusID`, `resourceTypeID`, `resourceFormatID`, `acquisitionTypeID`); ALTER TABLE `_DATABASE_NAME_`.`ResourceFormat` ADD INDEX `shortName` ( `shortName` );