From 9efd499bc19d1d87d6214a920cf3f9b214de28c0 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 26 Sep 2018 16:17:06 +0000 Subject: [PATCH] Bug 5458: DBRev 17.11.10.001 Signed-off-by: Nick Clemens (cherry picked from commit b5becc84f5f2e8f82b765b5ebf3f87a84d89cfd8) Signed-off-by: Martin Renvoize (cherry picked from commit d0affd28266fb9e7461521c703dd640e19c82b99) Signed-off-by: Fridolin Somers --- Koha.pm | 2 +- Koha/Schema/Result/BranchTransferLimit.pm | 8 ++++---- Koha/Schema/Result/CourseItem.pm | 8 ++++---- Koha/Schema/Result/Deleteditem.pm | 8 ++++---- Koha/Schema/Result/Item.pm | 8 ++++---- installer/data/mysql/atomicupdate/bug_5458.sql | 4 ---- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 7 files changed, 27 insertions(+), 21 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_5458.sql diff --git a/Koha.pm b/Koha.pm index 0fc7f43157..5426a74c1c 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 = "17.11.10.000"; +$VERSION = "17.11.10.001"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/BranchTransferLimit.pm b/Koha/Schema/Result/BranchTransferLimit.pm index a704c68ff9..ca1e3319f7 100644 --- a/Koha/Schema/Result/BranchTransferLimit.pm +++ b/Koha/Schema/Result/BranchTransferLimit.pm @@ -54,7 +54,7 @@ __PACKAGE__->table("branch_transfer_limits"); data_type: 'varchar' is_nullable: 1 - size: 10 + size: 80 =cut @@ -83,7 +83,7 @@ __PACKAGE__->add_columns( "itemtype", { data_type => "varchar", is_nullable => 1, size => 10 }, "ccode", - { data_type => "varchar", is_nullable => 1, size => 10 }, + { data_type => "varchar", is_nullable => 1, size => 80 }, ); =head1 PRIMARY KEY @@ -99,8 +99,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("limitId"); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-18 13:01:05 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XPpJwcw5PRa7Fo7PRg32zg +# Created by DBIx::Class::Schema::Loader v0.07045 @ 2018-10-03 15:19:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:or6PYVCOY/w4XGa60Go5iA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CourseItem.pm b/Koha/Schema/Result/CourseItem.pm index 1766302449..b2b4ecbdf0 100644 --- a/Koha/Schema/Result/CourseItem.pm +++ b/Koha/Schema/Result/CourseItem.pm @@ -45,7 +45,7 @@ __PACKAGE__->table("course_items"); data_type: 'varchar' is_nullable: 1 - size: 10 + size: 80 =head2 holdingbranch @@ -84,7 +84,7 @@ __PACKAGE__->add_columns( "itype", { data_type => "varchar", is_nullable => 1, size => 10 }, "ccode", - { data_type => "varchar", is_nullable => 1, size => 10 }, + { data_type => "varchar", is_nullable => 1, size => 80 }, "holdingbranch", { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, "location", @@ -184,8 +184,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-09-02 09:46:54 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g5lEeHNvnM4KIb6AJUxDOw +# Created by DBIx::Class::Schema::Loader v0.07045 @ 2018-10-03 15:19:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lmTZaIA8DKMWDC2Z6bsoHw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Deleteditem.pm b/Koha/Schema/Result/Deleteditem.pm index 38286e8ea1..bc3542c89f 100644 --- a/Koha/Schema/Result/Deleteditem.pm +++ b/Koha/Schema/Result/Deleteditem.pm @@ -229,7 +229,7 @@ __PACKAGE__->table("deleteditems"); data_type: 'varchar' is_nullable: 1 - size: 10 + size: 80 =head2 materials @@ -363,7 +363,7 @@ __PACKAGE__->add_columns( "cn_sort", { data_type => "varchar", is_nullable => 1, size => 255 }, "ccode", - { data_type => "varchar", is_nullable => 1, size => 10 }, + { data_type => "varchar", is_nullable => 1, size => 80 }, "materials", { data_type => "text", is_nullable => 1 }, "uri", @@ -395,8 +395,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("itemnumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-03-31 17:10:17 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:npNexLgE7AxLp6iVy1FxgQ +# Created by DBIx::Class::Schema::Loader v0.07045 @ 2018-10-03 15:19:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RQ8GZ7vWW+u+PcVtnrNj8A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index ce85bd7b72..e5417b61ad 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -233,7 +233,7 @@ __PACKAGE__->table("items"); data_type: 'varchar' is_nullable: 1 - size: 10 + size: 80 =head2 materials @@ -377,7 +377,7 @@ __PACKAGE__->add_columns( "cn_sort", { data_type => "varchar", is_nullable => 1, size => 255 }, "ccode", - { data_type => "varchar", is_nullable => 1, size => 10 }, + { data_type => "varchar", is_nullable => 1, size => 80 }, "materials", { data_type => "text", is_nullable => 1 }, "uri", @@ -675,8 +675,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vf1sBZrpUo0Cvi896fjNuA +# Created by DBIx::Class::Schema::Loader v0.07045 @ 2018-10-03 15:19:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R2nEAB7MozYXlDA21stObw __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); diff --git a/installer/data/mysql/atomicupdate/bug_5458.sql b/installer/data/mysql/atomicupdate/bug_5458.sql deleted file mode 100644 index 2fa22afb66..0000000000 --- a/installer/data/mysql/atomicupdate/bug_5458.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE items CHANGE COLUMN ccode ccode varchar(80) default NULL; -ALTER TABLE deleteditems CHANGE COLUMN ccode ccode varchar(80) default NULL; -ALTER TABLE branch_transfer_limits CHANGE COLUMN ccode ccode varchar(80) default NULL; -ALTER TABLE course_items CHANGE COLUMN ccode ccode varchar(80) default NULL; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e8ad0d5701..2b39be16a4 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -15205,6 +15205,16 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (17.11.10 release)\n"; } +$DBversion = '17.11.10.001'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q|ALTER TABLE items CHANGE COLUMN ccode ccode varchar(80) default NULL|); + $dbh->do(q|ALTER TABLE deleteditems CHANGE COLUMN ccode ccode varchar(80) default NULL|); + $dbh->do(q|ALTER TABLE branch_transfer_limits CHANGE COLUMN ccode ccode varchar(80) default NULL|); + $dbh->do(q|ALTER TABLE course_items CHANGE COLUMN ccode ccode varchar(80) default NULL|); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 5458: length of items.ccode disagrees with authorised_values.authorised_value)\n"; +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5