Bug 34789: (QA follow-up) Improve output of database update

* Adds description
* Adds column names to success messages

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Katrin Fischer 2023-09-17 13:18:49 +00:00 committed by Tomas Cohen Arazi
parent 4ec7c6a62e
commit c1b344b002
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return {
bug_number => "34789",
description => "A single line description",
description => "Correct datatypes and column name in table erm_eholdings_titles",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
@ -13,7 +13,7 @@ return {
ALTER TABLE erm_eholdings_titles RENAME COLUMN preceeding_publication_title_id TO preceding_publication_title_id
}
);
say $out 'Column renamed to preceding_publication_title_id';
say $out 'Column preceeding_publication_title renamed to preceding_publication_title_id';
}
if ( column_exists( 'erm_eholdings_titles', 'publication_title' ) ) {
$dbh->do(
@ -21,7 +21,7 @@ return {
ALTER TABLE erm_eholdings_titles MODIFY COLUMN publication_title mediumtext
}
);
say $out 'Column datatype amended to mediumtext';
say $out 'Column publication_title datatype amended to mediumtext';
}
if ( column_exists( 'erm_eholdings_titles', 'notes' ) ) {
$dbh->do(
@ -29,7 +29,7 @@ return {
ALTER TABLE erm_eholdings_titles MODIFY COLUMN notes mediumtext
}
);
say $out 'Column datatype amended to mediumtext';
say $out 'Column notes datatype amended to mediumtext';
}
},
};