From 4da2a353b71f0d9ae9f508704dddb65fa493e457 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 15 Apr 2020 12:37:24 +0100 Subject: [PATCH] Bug 25152: DBRev 19.12.00.073 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- Koha/Schema/Result/Subscription.pm | 12 ++++++++---- installer/data/mysql/atomicupdate/bug_25152.perl | 6 ------ installer/data/mysql/updatedatabase.pl | 7 +++++++ 4 files changed, 16 insertions(+), 11 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_25152.perl diff --git a/Koha.pm b/Koha.pm index 47fd8aea18..496a6ec31b 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 = "19.12.00.072"; +$VERSION = "19.12.00.073"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/Subscription.pm b/Koha/Schema/Result/Subscription.pm index 88b43251c1..735cd05655 100644 --- a/Koha/Schema/Result/Subscription.pm +++ b/Koha/Schema/Result/Subscription.pm @@ -249,7 +249,7 @@ __PACKAGE__->table("subscription"); =head2 closed - data_type: 'integer' + data_type: 'tinyint' default_value: 0 is_nullable: 0 @@ -356,7 +356,7 @@ __PACKAGE__->add_columns( "enddate", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "closed", - { data_type => "integer", default_value => 0, is_nullable => 0 }, + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "reneweddate", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "itemtype", @@ -452,8 +452,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-23 12:56:39 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dTb/JOO3KQ3NZGypFbRiEw +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-15 11:35:38 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5zW2XKZNcvytO8svTJ4ijQ __PACKAGE__->has_many( "additional_field_values", @@ -471,5 +471,9 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +__PACKAGE__->add_columns( + '+closed' => { is_boolean => 1 }, +); + # You can replace this text with custom content, and it will be preserved on regeneration 1; diff --git a/installer/data/mysql/atomicupdate/bug_25152.perl b/installer/data/mysql/atomicupdate/bug_25152.perl deleted file mode 100644 index 5980a8f0e8..0000000000 --- a/installer/data/mysql/atomicupdate/bug_25152.perl +++ /dev/null @@ -1,6 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do( "ALTER TABLE subscription MODIFY COLUMN closed tinyint(1) not null default 0" ); - - NewVersion( $DBversion, 25152, "Description"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c8c346c9ce..bce4964905 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21609,6 +21609,13 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 24380, "Add syspref CalculateFinesOnBackdate"); } +$DBversion = '19.12.00.073'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( "ALTER TABLE subscription MODIFY COLUMN closed tinyint(1) not null default 0" ); + + NewVersion( $DBversion, 25152, "Description"); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.20.1