From b72d9da369efc394e4a0b53a831364cd6802301d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 19 Jul 2019 10:07:17 +0100 Subject: [PATCH] Bug 23151: DBRev 19.05.01.001 Signed-off-by: Martin Renvoize (cherry picked from commit cca82cc6d04a7070688fe7a3d7d55cf385ae2502) Signed-off-by: Fridolin Somers --- Koha.pm | 2 +- Koha/Schema/Result/BorrowerModification.pm | 8 ++++---- installer/data/mysql/atomicupdate/bug_23151.perl | 8 -------- installer/data/mysql/updatedatabase.pl | 9 +++++++++ 4 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_23151.perl diff --git a/Koha.pm b/Koha.pm index 4e954f8f3f..78fb10ce2e 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.05.01.000"; +$VERSION = "19.05.01.001"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm index af7caece01..30cbac19fa 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: 1 + is_nullable: 0 =head2 borrowernumber @@ -439,7 +439,7 @@ __PACKAGE__->add_columns( "verification_token", { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, "changed_fields", - { data_type => "mediumtext", is_nullable => 1 }, + { data_type => "mediumtext", is_nullable => 0 }, "borrowernumber", { data_type => "integer", default_value => 0, is_nullable => 0 }, "cardnumber", @@ -617,8 +617,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("verification_token", "borrowernumber"); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-06-19 15:36:58 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j0cpf6F6MHMqFopc+/Wnbw +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-19 09:06:10 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+nEG7YltIcgswwr2/5OSAw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/installer/data/mysql/atomicupdate/bug_23151.perl b/installer/data/mysql/atomicupdate/bug_23151.perl deleted file mode 100644 index f32bef2973..0000000000 --- a/installer/data/mysql/atomicupdate/bug_23151.perl +++ /dev/null @@ -1,8 +0,0 @@ -$DBversion = 'XXX'; -if ( CheckVersion( $DBversion ) ) { - unless ( column_exists( 'borrower_modifications', 'changed_fields' ) ) { - $dbh->do("ALTER TABLE borrower_modifications ADD changed_fields MEDIUMTEXT AFTER verification_token;"); - } - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 23151 - Add borrower_modifications.changed_fields column)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 05996b0319..69c55fc35f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -18720,6 +18720,15 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (19.05.01 release)\n"; } +$DBversion = '19.05.01.001'; +if ( CheckVersion( $DBversion ) ) { + unless ( column_exists( 'borrower_modifications', 'changed_fields' ) ) { + $dbh->do("ALTER TABLE borrower_modifications ADD changed_fields MEDIUMTEXT AFTER verification_token;"); + } + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 23151 - Add borrower_modifications.changed_fields column)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5