From cca82cc6d04a7070688fe7a3d7d55cf385ae2502 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.06.00.013 Signed-off-by: Martin Renvoize --- 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 04feee3754..33e41fbd77 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.06.00.012"; +$VERSION = "19.06.00.013"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm index 81baac4d9d..c4a2814d3a 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 sub koha_object_class { 'Koha::Patron::Modification'; 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 01a47cb0d1..bc16a91b76 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -18979,6 +18979,15 @@ if ( CheckVersion($DBversion) ) { print "Upgrade to $DBversion done (Bug 22563 - Fix accounttypes for 'L', 'LR' and 'CR')\n"; } +$DBversion = '19.06.00.013'; +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. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5