Lines 7025-7030
if(CheckVersion($DBversion)) {
Link Here
|
7025 |
SetVersion($DBversion); |
7025 |
SetVersion($DBversion); |
7026 |
} |
7026 |
} |
7027 |
|
7027 |
|
|
|
7028 |
$DBversion = "3.13.00.XXX"; |
7029 |
if(CheckVersion($DBversion)) { |
7030 |
$dbh->do( |
7031 |
"INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACSearchExternalTargets','0','Whether to search external targets in the OPAC','','YesNo')" |
7032 |
); |
7033 |
$dbh->do( q{ |
7034 |
CREATE TABLE `external_targets` ( |
7035 |
`target_id` int(11) NOT NULL AUTO_INCREMENT, |
7036 |
`host` varchar(128) NOT NULL, |
7037 |
`port` int(11) NOT NULL, |
7038 |
`db` varchar(64) NOT NULL, |
7039 |
`userid` varchar(64) DEFAULT '', |
7040 |
`password` varchar(64) DEFAULT '', |
7041 |
`name` varchar(64) NOT NULL, |
7042 |
`syntax` varchar(64) NOT NULL, |
7043 |
`encoding` varchar(16) DEFAULT 'MARC-8', |
7044 |
PRIMARY KEY (`target_id`) |
7045 |
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 |
7046 |
} ); |
7047 |
$dbh->do( q{ |
7048 |
CREATE TABLE `external_target_restrictions` ( |
7049 |
`branchcode` varchar(10) NOT NULL, |
7050 |
`target_id` int(11) NOT NULL, |
7051 |
KEY `branchcode` (`branchcode`), |
7052 |
KEY `target_id` (`target_id`), |
7053 |
CONSTRAINT `external_target_restrictions_ibfk_1` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE, |
7054 |
CONSTRAINT `external_target_restrictions_ibfk_2` FOREIGN KEY (`target_id`) REFERENCES `external_targets` (`target_id`) ON DELETE CASCADE |
7055 |
) ENGINE=InnoDB DEFAULT CHARSET=utf |
7056 |
} ); |
7057 |
print "Upgrade to $DBversion done (Bug 10486 - Allow external Z39.50 targets to be searched from the OPAC)\n"; |
7058 |
SetVersion($DBversion); |
7059 |
} |
7060 |
|
7028 |
=head1 FUNCTIONS |
7061 |
=head1 FUNCTIONS |
7029 |
|
7062 |
|
7030 |
=head2 TableExists($table) |
7063 |
=head2 TableExists($table) |