From 167a498ea290dae60eda2050c6434070e88498a1 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 28 Oct 2024 13:16:19 +0000 Subject: [PATCH] Bug 33484: DBRev 24.06.00.48 Signed-off-by: Katrin Fischer --- Koha.pm | 2 +- .../bug_33484.pl => db_revs/240600048.pl} | 23 +++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) rename installer/data/mysql/{atomicupdate/bug_33484.pl => db_revs/240600048.pl} (54%) diff --git a/Koha.pm b/Koha.pm index 958b413289..6ad5d7c2d0 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "24.06.00.047"; +$VERSION = "24.06.00.048"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_33484.pl b/installer/data/mysql/db_revs/240600048.pl similarity index 54% rename from installer/data/mysql/atomicupdate/bug_33484.pl rename to installer/data/mysql/db_revs/240600048.pl index 29f1102413..b77886f111 100755 --- a/installer/data/mysql/atomicupdate/bug_33484.pl +++ b/installer/data/mysql/db_revs/240600048.pl @@ -1,24 +1,29 @@ use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); return { - bug_number => "33484", + bug_number => "33484", description => "Add state save as an option to datatables", - up => sub { + up => sub { my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; + my ( $dbh, $out ) = @$args{qw(dbh out)}; if ( !column_exists( 'tables_settings', 'default_save_state' ) ) { - $dbh->do(q{ + $dbh->do( + q{ ALTER TABLE tables_settings ADD COLUMN default_save_state tinyint(1) DEFAULT 1 AFTER default_sort_order - }); - say $out "Added column 'tables_settings.default_save_state'"; + } + ); + say_success( $out, "Added column 'tables_settings.default_save_state'" ); } if ( !column_exists( 'tables_settings', 'default_save_state_search' ) ) { - $dbh->do(q{ + $dbh->do( + q{ ALTER TABLE tables_settings ADD COLUMN default_save_state_search tinyint(1) DEFAULT 0 AFTER default_save_state - }); - say $out "Added column 'tables_settings.default_save_state_search'"; + } + ); + say_success( $out, "Added column 'tables_settings.default_save_state_search'" ); } }, }; -- 2.39.5