Lines 7130-7136
if ( CheckVersion($DBversion) ) {
Link Here
|
7130 |
SetVersion($DBversion); |
7130 |
SetVersion($DBversion); |
7131 |
} |
7131 |
} |
7132 |
|
7132 |
|
7133 |
|
|
|
7134 |
$DBversion = "3.13.00.020"; |
7133 |
$DBversion = "3.13.00.020"; |
7135 |
if ( CheckVersion($DBversion) ) { |
7134 |
if ( CheckVersion($DBversion) ) { |
7136 |
$dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('WhenLostForgiveFine','0',NULL,'If ON, Forgives the fines on an item when it is lost.','YesNo')"); |
7135 |
$dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('WhenLostForgiveFine','0',NULL,'If ON, Forgives the fines on an item when it is lost.','YesNo')"); |
Lines 7306-7311
if ( CheckVersion($DBversion) ) {
Link Here
|
7306 |
SetVersion($DBversion); |
7305 |
SetVersion($DBversion); |
7307 |
} |
7306 |
} |
7308 |
|
7307 |
|
|
|
7308 |
|
7309 |
|
7310 |
|
7311 |
|
7312 |
|
7313 |
|
7314 |
|
7315 |
|
7316 |
|
7317 |
$DBversion = "3.13.00.XXX"; |
7318 |
if ( CheckVersion($DBversion) ) { |
7319 |
$dbh->do(q| |
7320 |
CREATE TABLE `additional_fields` ( |
7321 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
7322 |
`tablename` varchar(255) NOT NULL DEFAULT '', |
7323 |
`name` varchar(255) NOT NULL DEFAULT '', |
7324 |
`authorised_value_category` varchar(16) NOT NULL DEFAULT '', |
7325 |
`marcfield` varchar(16) NOT NULL DEFAULT '', |
7326 |
`searchable` tinyint(1) NOT NULL DEFAULT '0', |
7327 |
PRIMARY KEY (`id`), |
7328 |
UNIQUE KEY `fields_uniq` (`tablename`,`name`) |
7329 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
7330 |
|); |
7331 |
$dbh->do(q| |
7332 |
CREATE TABLE `additional_field_values` ( |
7333 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
7334 |
`field_id` int(11) NOT NULL, |
7335 |
`record_id` int(11) NOT NULL, |
7336 |
`value` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', |
7337 |
PRIMARY KEY (`id`), |
7338 |
UNIQUE KEY `field_record` (`field_id`,`record_id`), |
7339 |
CONSTRAINT `afv_fk` FOREIGN KEY (`field_id`) REFERENCES `additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
7340 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
7341 |
|); |
7342 |
print "Upgrade to $DBversion done (Bug 10855: Add tables additional_fields and additional_field_values)\n"; |
7343 |
SetVersion($DBversion); |
7344 |
} |
7345 |
|
7309 |
=head1 FUNCTIONS |
7346 |
=head1 FUNCTIONS |
7310 |
|
7347 |
|
7311 |
=head2 TableExists($table) |
7348 |
=head2 TableExists($table) |
7312 |
- |
|
|