Bug 40292: Add a specific error if a previous upgrade failed
We can reach an inconsistent state if the upgrade DB failed and
new_record_id has been created but renamed.
I don't think we should try to recover from this state, but have a
specific error message in this case. We will guide people asking for
help.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9e0a70fced)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
d45be6eca8
commit
9cdf2afc61
|
|
@ -12,7 +12,9 @@ return {
|
|||
$sth->execute();
|
||||
my $column_info = $sth->fetchrow_hashref();
|
||||
|
||||
if ( $column_info && $column_info->{Type} eq 'int(11)' ) {
|
||||
if ( column_exists('additional_field_values', 'new_record_id') ) {
|
||||
die "The database is an inconsistent state, a previous upgrade went wrong. Please try a new upgrade from a previous backup and using a newest version of Koha";
|
||||
} elsif ( $column_info && $column_info->{Type} eq 'int(11)' ) {
|
||||
|
||||
# Only run the migration if record_id is still an integer type
|
||||
say_info( $out, "Converting record_id from int(11) to VARCHAR(11)...\n" );
|
||||
|
|
|
|||
Loading…
Reference in New Issue