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>
This commit is contained in:
parent
a0cc8aa9d7
commit
de5e76bac2
|
|
@ -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'; }
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue