Bug 13443 - DBD::mysql::db do failed: Table 'koha_library.roadtype' doesn't exist
Summary: DBD::mysql::db do failed: Table 'koha_library.roadtype' doesn't exist
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: 3.16
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on: 7372
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-11 17:18 UTC by vimal kumar
Modified: 2016-06-21 21:37 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vimal kumar 2014-12-11 17:18:39 UTC
Dear Friends,
I just tried to upgrade Koha 3.14 (old stable) to 3.16.
I installed Koha from Ubuntu packages.
I executed following three commands to upgrade Koha,

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install koha-common

I got following error message at the end in terminal,

DBD::mysql::db do failed: Table 'koha_library.roadtype' doesn't exist at
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
line 7987.
DBD::mysql::db do failed: Table 'koha_library.roadtype' doesn't exist at
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
line 7987.
dpkg: error processing koha-common (--configure):
 subprocess installed post-installation script returned error exit status
255
E: Sub-process /usr/bin/dpkg returned an error code (1)

Up gradation process in web interface does not proceed and it repeat it
again and again.

How can I overcome this problem.
Comment 1 vimal kumar 2014-12-19 03:46:42 UTC
I have solved the problem. Please follow the steps,

Open a terminal

sudo su

leafpad /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl

Search > Jump To > 7985

Find the line
$dbh->{RaiseError} = 0;

Change the value 1 to 0.
Save file.

Go back to koha and refresh the page.
Comment 2 Mason James 2015-07-21 02:11:09 UTC
> Find the line
> $dbh->{RaiseError} = 0;
> 
> Change the value 1 to 0.

this doesn't fix the error, it just hides the error
ie: the error will still exist after the change
Comment 3 Mason James 2015-07-21 02:20:54 UTC
i think the problem here, is that this specific Koha database is missing its 'roadtype' table

if that table exists, this error should not occur

i think the proper solution to this problem is to add the 'roadtype' table to this problem database, then attempt another upgrade

this bug might be a WONTFIX
Comment 4 David Cook 2015-07-21 03:37:43 UTC
(In reply to vimal kumar from comment #0)
> DBD::mysql::db do failed: Table 'koha_library.roadtype' doesn't exist at
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> line 7987.
> DBD::mysql::db do failed: Table 'koha_library.roadtype' doesn't exist at
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> line 7987.
>

I've seen this before... usually when trying to use older Koha code on a newer Koha database.

If the Koha database really is a 3.14 database, it should have a table called "roadtype".

I'm guessing if you're seeing this error... that someone has made manual changes to this database... or the upgrade failed between "$dbh->commit;" and "SetVersion($DBversion);" but I doubt that.
Comment 5 Jonathan Druart 2015-08-04 06:56:27 UTC
(In reply to Mason James from comment #3)
> this bug might be a WONTFIX

Agreed, I would even say this is not a bug.