$DBversion = "3.23.00.050";
if ( CheckVersion($DBversion) ) {
- use Koha::SearchMarcMaps;
- use Koha::SearchFields;
- use Koha::SearchEngine::Elasticsearch;
$dbh->do(q|INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
VALUES('SearchEngine','Zebra','Choose Search Engine','','Choice')|);
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
|);
- # Insert default mappings
- Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings;
-
-print "Upgrade to $DBversion done (Bug 12478 - Elasticsearch support for Koha)\n";
+ print "WARNING: If you plan to use Elasticsearch you should go to 'Home › Administration › Search engine configuration' and reset the mappings\n";
+ print "Upgrade to $DBversion done (Bug 12478 - Elasticsearch support for Koha)\n";
SetVersion($DBversion);
- }
+}
$DBversion = "3.23.00.051";
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('UpdateItemWhenLostFromHoldList','',NULL,'This is a list of values to update an item when it is marked as lost from the holds to pull screen','Free');
} );
$dbh->do( q{
- UPDATE systempreferences SET options="batchmod|moredetail|cronjob|additem|pendingreserves", value="batchmod|moredetail|cronjob|additem|pendingreserves" WHERE variable="MarkLostItemsAsReturned";
+ UPDATE systempreferences SET options="batchmod|moredetail|cronjob|additem|pendingreserves" WHERE variable="MarkLostItemsAsReturned";
} );
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 20312 - Add showLastPatron systempreference)\n";
}
+$DBversion = '18.06.00.058';
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do(q{
+ INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
+ ('MarcFieldForCreatorId','',NULL,'Where to store the borrowernumber of the record''s creator','Free'),
+ ('MarcFieldForCreatorName','',NULL,'Where to store the name of the record''s creator','Free'),
+ ('MarcFieldForModifierId','',NULL,'Where to store the borrowernumber of the record''s last modifier','Free'),
+ ('MarcFieldForModifierName','',NULL,'Where to store the name of the record''s last modifier','Free')
+ });
+
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 19349 - Add system preferences MarcFieldForCreatorId, MarcFieldForCreatorName, MarcFieldForModifierId, MarcFieldForModifierName)\n";
+}
+
+$DBversion = '18.06.00.059';
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do(q{
+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type`) VALUES ('EmailSMSSendDriverFromAddress', '', '', 'Email SMS send driver from address override', 'Free');
+ });
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 20356 - Add EmailSMSSendDriverFromAddress system preference)\n";
+}
+
+$DBversion = '18.06.00.060';
+if( CheckVersion( $DBversion ) ) {
+ unless( TableExists( 'class_split_rules' ) ) {
+ $dbh->do(q|
+ CREATE TABLE class_split_rules (
+ class_split_rule varchar(10) NOT NULL default '',
+ description LONGTEXT,
+ split_routine varchar(30) NOT NULL default '',
+ split_regex varchar(255) NOT NULL default '',
+ PRIMARY KEY (class_split_rule),
+ UNIQUE KEY class_split_rule_idx (class_split_rule)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
+ |);
+
+ $dbh->do(q|
+ ALTER TABLE class_sources
+ ADD COLUMN class_split_rule varchar(10) NOT NULL default ''
+ AFTER class_sort_rule
+ |);
+ $dbh->do(q|
+ UPDATE class_sources
+ SET class_split_rule = class_sort_rule
+ |);
+
+ $dbh->do(q|
+ INSERT INTO class_split_rules(class_split_rule, description, split_routine)
+ VALUES
+ ('dewey', 'Default sorting rules for DDC', 'Dewey'),
+ ('lcc', 'Default sorting rules for LCC', 'LCC'),
+ ('generic', 'Generic call number sorting rules', 'Generic')
+ |);
+
+ $dbh->do(q|
+ ALTER TABLE class_sources
+ ADD CONSTRAINT class_source_ibfk_2 FOREIGN KEY (class_split_rule)
+ REFERENCES class_split_rules (class_split_rule)
+ |);
+ }
+
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 15836 - Add class_sort_rules.split_routine and split_regex)\n";
+}
+
+$DBversion = '18.06.00.061';
+if ( CheckVersion($DBversion) ) {
+ $dbh->do(q{
+ INSERT IGNORE INTO `systempreferences` (`variable`,`value`,`explanation`,`options`,`type`) VALUES
+ ('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL),
+ ('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL)
+ });
+ SetVersion($DBversion);
+ print "Upgrade to $DBversion done (Bug 19893 - Add elasticsearch index status preferences)\n";
+}
+
+$DBversion = '18.06.00.062';
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do( "INSERT IGNORE INTO authorised_value_categories (category_name) VALUES ('PA_CLASS');");
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 21730: Add new authorised value category PA_CLASS)\n";
+}
+
+$DBversion = '18.11.00.000';
+if( CheckVersion( $DBversion ) ) {
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (18.11.00 release)\n";
+}
+
+$DBversion = '18.12.00.000';
+if( CheckVersion( $DBversion ) ) {
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (...and Steven!)\n";
+}
+
+$DBversion = '18.12.00.001';
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do(q{
+ UPDATE permissions SET code = 'manage_didyoumean' WHERE code = 'manage_didyouean';
+ });
+ $dbh->do(q{
+ UPDATE user_permissions SET code = 'manage_didyoumean' WHERE code = 'manage_didyouean';
+ });
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion (Bug 21961 - Fix typo in manage_didyoumean permission)\n";
+}
+
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.