Bug 40292: (QA follow-up) Tidy db_revs/241200018.pl, atomicupdate/bug_40292.pl

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 de5e76bac2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Paul Derscheid 2025-10-06 10:37:27 +02:00
parent 2eb0befc36
commit 9c4960df96
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
2 changed files with 4 additions and 3 deletions

View File

@ -8,7 +8,7 @@ return {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
if ( column_exists('additional_field_values', 'new_record_id') ) {
if ( column_exists( 'additional_field_values', 'new_record_id' ) ) {
$dbh->do(
q{ ALTER TABLE additional_field_values CHANGE COLUMN new_record_id record_id VARCHAR(11) NOT NULL DEFAULT '' COMMENT 'record_id'; }
);

View File

@ -12,8 +12,9 @@ return {
$sth->execute();
my $column_info = $sth->fetchrow_hashref();
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";
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