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 7596-7601
if ( CheckVersion($DBversion) ) {
Link Here
|
7596 |
} |
7595 |
} |
7597 |
|
7596 |
|
7598 |
|
7597 |
|
|
|
7598 |
|
7599 |
|
7600 |
|
7601 |
|
7602 |
|
7603 |
|
7604 |
|
7605 |
|
7606 |
|
7607 |
$DBversion = "3.13.00.XXX"; |
7608 |
if ( CheckVersion($DBversion) ) { |
7609 |
$dbh->do(q| |
7610 |
CREATE TABLE `additional_fields` ( |
7611 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
7612 |
`tablename` varchar(255) NOT NULL DEFAULT '', |
7613 |
`name` varchar(255) NOT NULL DEFAULT '', |
7614 |
`authorised_value_category` varchar(16) NOT NULL DEFAULT '', |
7615 |
`marcfield` varchar(16) NOT NULL DEFAULT '', |
7616 |
`searchable` tinyint(1) NOT NULL DEFAULT '0', |
7617 |
PRIMARY KEY (`id`), |
7618 |
UNIQUE KEY `fields_uniq` (`tablename`,`name`) |
7619 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
7620 |
|); |
7621 |
$dbh->do(q| |
7622 |
CREATE TABLE `additional_field_values` ( |
7623 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
7624 |
`field_id` int(11) NOT NULL, |
7625 |
`record_id` int(11) NOT NULL, |
7626 |
`value` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', |
7627 |
PRIMARY KEY (`id`), |
7628 |
UNIQUE KEY `field_record` (`field_id`,`record_id`), |
7629 |
CONSTRAINT `afv_fk` FOREIGN KEY (`field_id`) REFERENCES `additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
7630 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
7631 |
|); |
7632 |
print "Upgrade to $DBversion done (Bug 10855: Add tables additional_fields and additional_field_values)\n"; |
7633 |
SetVersion($DBversion); |
7634 |
} |
7635 |
|
7599 |
=head1 FUNCTIONS |
7636 |
=head1 FUNCTIONS |
7600 |
|
7637 |
|
7601 |
=head2 TableExists($table) |
7638 |
=head2 TableExists($table) |
7602 |
- |
|
|