From 8aec7aa5fa7e5c2e7921cf9e0e8ec06961fa80af Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 17 Feb 2020 10:43:37 +0000 Subject: [PATCH] Bug 20882: DBRev 19.12.00.022 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- Koha/Schema/Result/Deleteditem.pm | 9 ++++----- Koha/Schema/Result/Item.pm | 9 ++++----- installer/data/mysql/atomicupdate/bug20882.perl | 8 -------- installer/data/mysql/updatedatabase.pl | 9 +++++++++ 5 files changed, 18 insertions(+), 19 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug20882.perl diff --git a/Koha.pm b/Koha.pm index 2d3dea5d8f..198019c56f 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.021"; +$VERSION = "19.12.00.022"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/Deleteditem.pm b/Koha/Schema/Result/Deleteditem.pm index c2703ed44f..70a3e36eb0 100644 --- a/Koha/Schema/Result/Deleteditem.pm +++ b/Koha/Schema/Result/Deleteditem.pm @@ -244,9 +244,8 @@ __PACKAGE__->table("deleteditems"); =head2 uri - data_type: 'varchar' + data_type: 'mediumtext' is_nullable: 1 - size: 255 =head2 itype @@ -379,7 +378,7 @@ __PACKAGE__->add_columns( "materials", { data_type => "mediumtext", is_nullable => 1 }, "uri", - { data_type => "varchar", is_nullable => 1, size => 255 }, + { data_type => "mediumtext", is_nullable => 1 }, "itype", { data_type => "varchar", is_nullable => 1, size => 10 }, "more_subfields_xml", @@ -407,8 +406,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("itemnumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-26 16:15:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:L7G0HG5gvgyhfpKb7LcUFw +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-17 10:42:24 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1+z3OHx5OpOcP82k8vyAaA sub koha_objects_class { 'Koha::Old::Items'; diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index ba860f79b8..58cddf4502 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -248,9 +248,8 @@ __PACKAGE__->table("items"); =head2 uri - data_type: 'varchar' + data_type: 'mediumtext' is_nullable: 1 - size: 255 =head2 itype @@ -393,7 +392,7 @@ __PACKAGE__->add_columns( "materials", { data_type => "mediumtext", is_nullable => 1 }, "uri", - { data_type => "varchar", is_nullable => 1, size => 255 }, + { data_type => "mediumtext", is_nullable => 1 }, "itype", { data_type => "varchar", is_nullable => 1, size => 10 }, "more_subfields_xml", @@ -747,8 +746,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-10 14:31:00 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dqUjo9pJysKKBhF8PM5KnA +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-17 10:42:24 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CcrMhgq+PQ1MHV6jZEN8wA __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); diff --git a/installer/data/mysql/atomicupdate/bug20882.perl b/installer/data/mysql/atomicupdate/bug20882.perl deleted file mode 100644 index 5cbe8520db..0000000000 --- a/installer/data/mysql/atomicupdate/bug20882.perl +++ /dev/null @@ -1,8 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do( "ALTER TABLE items MODIFY COLUMN uri MEDIUMTEXT" ); - $dbh->do( "ALTER TABLE deleteditems MODIFY COLUMN uri MEDIUMTEXT" ); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 20882 - items.uri to MEDIUMTEXT)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9591b9f1a0..c6b33806cf 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -20808,6 +20808,15 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 24592 - Update LOST_RETURN to LOST_FOUND)\n"; } +$DBversion = '19.12.00.022'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( "ALTER TABLE items MODIFY COLUMN uri MEDIUMTEXT" ); + $dbh->do( "ALTER TABLE deleteditems MODIFY COLUMN uri MEDIUMTEXT" ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20882 - items.uri to MEDIUMTEXT)\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