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 7139-7144
if ( CheckVersion($DBversion) ) {
Link Here
|
7139 |
SetVersion ($DBversion); |
7138 |
SetVersion ($DBversion); |
7140 |
} |
7139 |
} |
7141 |
|
7140 |
|
|
|
7141 |
|
7142 |
|
7143 |
|
7144 |
|
7145 |
|
7146 |
|
7147 |
|
7148 |
|
7149 |
|
7150 |
|
7151 |
$DBversion = "3.13.00.XXX"; |
7152 |
if ( CheckVersion($DBversion) ) { |
7153 |
$dbh->do(q| |
7154 |
CREATE TABLE `additional_fields` ( |
7155 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
7156 |
`tablename` varchar(255) NOT NULL DEFAULT '', |
7157 |
`name` varchar(255) NOT NULL DEFAULT '', |
7158 |
`authorised_value_category` varchar(16) NOT NULL DEFAULT '', |
7159 |
`marcfield` varchar(16) NOT NULL DEFAULT '', |
7160 |
`searchable` tinyint(1) NOT NULL DEFAULT '0', |
7161 |
PRIMARY KEY (`id`), |
7162 |
UNIQUE KEY `fields_uniq` (`tablename`,`name`) |
7163 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
7164 |
|); |
7165 |
$dbh->do(q| |
7166 |
CREATE TABLE `additional_field_values` ( |
7167 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
7168 |
`field_id` int(11) NOT NULL, |
7169 |
`record_id` int(11) NOT NULL, |
7170 |
`value` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', |
7171 |
PRIMARY KEY (`id`), |
7172 |
UNIQUE KEY `field_record` (`field_id`,`record_id`), |
7173 |
CONSTRAINT `afv_fk` FOREIGN KEY (`field_id`) REFERENCES `additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
7174 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
7175 |
|); |
7176 |
print "Upgrade to $DBversion done (Bug 10855: Add tables additional_fields and additional_field_values)\n"; |
7177 |
SetVersion($DBversion); |
7178 |
} |
7179 |
|
7142 |
=head1 FUNCTIONS |
7180 |
=head1 FUNCTIONS |
7143 |
|
7181 |
|
7144 |
=head2 TableExists($table) |
7182 |
=head2 TableExists($table) |
7145 |
- |
|
|