Bugzilla – Attachment 82822 Details for
Bug 21931
Upgrade from 3.22 fails when running updatedatabase.pl script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Fix updatedatabase.pl
0001-Bug-21931-Fix-a-bug-when-upgrading-from-from-3.22-to.patch (text/plain), 2.26 KB, created by
Alex Bernier
on 2018-12-01 17:39:31 UTC
(
hide
)
Description:
Fix updatedatabase.pl
Filename:
MIME Type:
Creator:
Alex Bernier
Created:
2018-12-01 17:39:31 UTC
Size:
2.26 KB
patch
obsolete
>From 5a05b9faa8e2b41816a2f1201fcb8482a51294f1 Mon Sep 17 00:00:00 2001 >From: Alex Bernier <alex.bernier@braillenet.org> >Date: Sat, 1 Dec 2018 18:22:00 +0100 >Subject: [PATCH] Bug 21931: Fix a bug when upgrading from from 3.22 to 18.11 >Content-Type: text/plain; charset="utf-8" > >When ugprading from Koha 3.22 to 18.11, the updatedatabase.pl script >fails when running the DBversion = "3.23.00.050" step, because the "weight" >column is not present in the "search_field" table. >The call to "Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings" >fails. This patch adds the "weight" column to fix the issue. > >To test : >- Import a Koha 3.22 database >- Try to update the DB using the 18.11 codebase with installer/data/mysql/updatedatabase.pl >- The DB update process fails and stops with the following error message : > DBD::mysql::st execute failed: Unknown column 'me.weight' in 'field list' [for Statement "SELECT `me`.`id`, `me`.`name`, `me`.`label`, `me`.`type`, `me`.`weight` FROM `search_field` `me` WHERE ( `me`.`name` = ? )" with ParamValues: 0='suppress'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836. > DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'me.weight' in 'field list' at /.../Koha/Objects.pm line 110 >- Apply the patch >- Run installer/data/mysql/updatedatabase.pl again >- The update process should go ahead >--- > installer/data/mysql/updatedatabase.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index d0eb565bfd..090327a135 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -12339,6 +12339,7 @@ if ( CheckVersion($DBversion) ) { > `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine', > `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display', > `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine', >+ `weight` decimal(5,2) DEFAULT NULL, > PRIMARY KEY (`id`), > UNIQUE KEY (`name`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci >-- >2.17.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 21931
:
82822
|
83001
|
83166
|
83171