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>
(cherry picked from commit c1b344b002)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ab85941b5f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Katrin Fischer 2023-09-17 13:18:49 +00:00 committed by Matt Blenkinsop
parent 9d60d2346d
commit 56fabf3117

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';
}
},
};