From 3fbcfcae359278149af78af8c772c947784528f2 Mon Sep 17 00:00:00 2001 From: Emily Lamancusa Date: Thu, 7 Nov 2024 10:20:01 -0500 Subject: [PATCH] Bug 38299: [DO NOT PUSH] Test dbrev --- .../data/mysql/atomicupdate/dbrev_test.pl | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/dbrev_test.pl diff --git a/installer/data/mysql/atomicupdate/dbrev_test.pl b/installer/data/mysql/atomicupdate/dbrev_test.pl new file mode 100755 index 0000000000..eec27863e7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/dbrev_test.pl @@ -0,0 +1,44 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); + +return { + bug_number => "BUG_NUMBER", + description => "Test dbrev", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + say_success($out, "Success!"); + say_info($out, "Info..."); + say_warning($out, "Warning!!"); + say_failure($out, "Failure :("); + + # Do you stuffs here + $dbh->do(q{CREATE TABLE borrowers}); + + # Print useful stuff here + # tables + say $out "Added new table 'XXX'"; + say $out "Added column 'XXX.YYY'"; + + # sysprefs + say $out "Added new system preference 'XXX'"; + say $out "Updated system preference 'XXX'"; + say $out "Removed system preference 'XXX'"; + + # permissions + say $out "Added new permission 'XXX'"; + + # letters + say $out "Added new letter 'XXX' (TRANSPORT)"; + + # HTML customizations + say $out "Added 'XXX' HTML customization"; + + # Other information + say_failure( $out, "Use red for danger/failure" ); + say_success( $out, "Use green for success" ); + say_warning( $out, "Use yellow for warning/a call to action" ); + say_info( $out, "Use blue for further information" ); + }, +}; -- 2.34.1