From 2d5d9a54bd9b8927b82066b35dcaec20cad764ea Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 17 Apr 2020 09:13:13 +0100 Subject: [PATCH] Bug 25086: DBRev 19.12.00.075 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- Koha/Schema/Result/BorrowerModification.pm | 8 ++++---- installer/data/mysql/atomicupdate/bug_25086.perl | 9 --------- installer/data/mysql/updatedatabase.pl | 8 ++++++++ 4 files changed, 13 insertions(+), 14 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_25086.perl diff --git a/Koha.pm b/Koha.pm index 8c89f5b45d..fbf8b4093d 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.074"; +$VERSION = "19.12.00.075"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm index 3db708d3fc..f11d0880b7 100644 --- a/Koha/Schema/Result/BorrowerModification.pm +++ b/Koha/Schema/Result/BorrowerModification.pm @@ -40,7 +40,7 @@ __PACKAGE__->table("borrower_modifications"); =head2 changed_fields data_type: 'mediumtext' - is_nullable: 0 + is_nullable: 1 =head2 borrowernumber @@ -434,7 +434,7 @@ __PACKAGE__->add_columns( "verification_token", { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, "changed_fields", - { data_type => "mediumtext", is_nullable => 0 }, + { data_type => "mediumtext", is_nullable => 1 }, "borrowernumber", { data_type => "integer", default_value => 0, is_nullable => 0 }, "cardnumber", @@ -610,8 +610,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("verification_token", "borrowernumber"); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-22 16:54:42 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jkZUTN+mGIdp8ySV0BYNTw +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-17 08:12:55 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eK1U1HkJyF1dL9WpcrkxdA sub koha_object_class { 'Koha::Patron::Modification'; diff --git a/installer/data/mysql/atomicupdate/bug_25086.perl b/installer/data/mysql/atomicupdate/bug_25086.perl deleted file mode 100644 index 183408e6d4..0000000000 --- a/installer/data/mysql/atomicupdate/bug_25086.perl +++ /dev/null @@ -1,9 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - # you can use $dbh here like: - - $dbh->do( "ALTER TABLE borrower_modifications MODIFY changed_fields MEDIUMTEXT DEFAULT NULL" ); - - # Always end with this (adjust the bug info) - NewVersion( $DBversion, 25086, "Set changed_fields column of borrower_modifications as nullable"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index d3ac242ddf..0f9c5c85b0 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21621,6 +21621,14 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 25147, "Rename AllowSelfCheckReturns to SCOAllowCheckin for consistency"); } +$DBversion = '19.12.00.075'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do( "ALTER TABLE borrower_modifications MODIFY changed_fields MEDIUMTEXT DEFAULT NULL" ); + + NewVersion( $DBversion, 25086, "Set changed_fields column of borrower_modifications as nullable"); +} + # 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.39.5