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 7831-7836
if ( CheckVersion($DBversion) ) {
Link Here
|
7831 |
SetVersion ($DBversion); |
7830 |
SetVersion ($DBversion); |
7832 |
} |
7831 |
} |
7833 |
|
7832 |
|
|
|
7833 |
|
7834 |
|
7835 |
|
7836 |
|
7837 |
|
7838 |
|
7839 |
$DBversion = "3.15.00.XXX"; |
7840 |
if ( CheckVersion($DBversion) ) { |
7841 |
$dbh->do(q| |
7842 |
CREATE TABLE `additional_fields` ( |
7843 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
7844 |
`tablename` varchar(255) NOT NULL DEFAULT '', |
7845 |
`name` varchar(255) NOT NULL DEFAULT '', |
7846 |
`authorised_value_category` varchar(16) NOT NULL DEFAULT '', |
7847 |
`marcfield` varchar(16) NOT NULL DEFAULT '', |
7848 |
`searchable` tinyint(1) NOT NULL DEFAULT '0', |
7849 |
PRIMARY KEY (`id`), |
7850 |
UNIQUE KEY `fields_uniq` (`tablename`,`name`) |
7851 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
7852 |
|); |
7853 |
$dbh->do(q| |
7854 |
CREATE TABLE `additional_field_values` ( |
7855 |
`id` int(11) NOT NULL AUTO_INCREMENT, |
7856 |
`field_id` int(11) NOT NULL, |
7857 |
`record_id` int(11) NOT NULL, |
7858 |
`value` varchar(255) NOT NULL DEFAULT '', |
7859 |
PRIMARY KEY (`id`), |
7860 |
UNIQUE KEY `field_record` (`field_id`,`record_id`), |
7861 |
CONSTRAINT `afv_fk` FOREIGN KEY (`field_id`) REFERENCES `additional_fields` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
7862 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
7863 |
|); |
7864 |
print "Upgrade to $DBversion done (Bug 10855: Add tables additional_fields and additional_field_values)\n"; |
7865 |
SetVersion($DBversion); |
7866 |
} |
7867 |
|
7834 |
=head1 FUNCTIONS |
7868 |
=head1 FUNCTIONS |
7835 |
|
7869 |
|
7836 |
=head2 TableExists($table) |
7870 |
=head2 TableExists($table) |
7837 |
- |
|
|