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 7912-7917
if ( CheckVersion($DBversion) ) {
Link Here
|
7912 |
SetVersion($DBversion); |
7911 |
SetVersion($DBversion); |
7913 |
} |
7912 |
} |
7914 |
|
7913 |
|
|
|
7914 |
|
7915 |
|
7916 |
|
7917 |
|
7918 |
$DBversion = "3.15.00.XXX"; |
7919 |
if ( CheckVersion($DBversion) ) { |
7920 |
$dbh->do(q| |
7921 |
CREATE TABLE `additional_fields` ( |
7922 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
7923 |
`tablename` varchar(255) NOT NULL DEFAULT '', |
7924 |
`name` varchar(255) NOT NULL DEFAULT '', |
7925 |
`authorised_value_category` varchar(16) NOT NULL DEFAULT '', |
7926 |
`marcfield` varchar(16) NOT NULL DEFAULT '', |
7927 |
`searchable` tinyint(1) NOT NULL DEFAULT '0', |
7928 |
PRIMARY KEY (`id`), |
7929 |
UNIQUE KEY `fields_uniq` (`tablename`,`name`) |
7930 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
7931 |
|); |
7932 |
$dbh->do(q| |
7933 |
CREATE TABLE `additional_field_values` ( |
7934 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
7935 |
`field_id` int(11) NOT NULL, |
7936 |
`record_id` int(11) NOT NULL, |
7937 |
`value` varchar(255) NOT NULL DEFAULT '', |
7938 |
PRIMARY KEY (`id`), |
7939 |
UNIQUE KEY `field_record` (`field_id`,`record_id`), |
7940 |
CONSTRAINT `afv_fk` FOREIGN KEY (`field_id`) REFERENCES `additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
7941 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
7942 |
|); |
7943 |
print "Upgrade to $DBversion done (Bug 10855: Add tables additional_fields and additional_field_values)\n"; |
7944 |
SetVersion($DBversion); |
7945 |
} |
7946 |
|
7915 |
=head1 FUNCTIONS |
7947 |
=head1 FUNCTIONS |
7916 |
|
7948 |
|
7917 |
=head2 TableExists($table) |
7949 |
=head2 TableExists($table) |
7918 |
- |
|
|