From d0affd28266fb9e7461521c703dd640e19c82b99 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 26 Sep 2018 16:17:06 +0000 Subject: [PATCH] Bug 5458: DBRev 18.05.04.001 Signed-off-by: Nick Clemens (cherry picked from commit b5becc84f5f2e8f82b765b5ebf3f87a84d89cfd8) Signed-off-by: Martin Renvoize --- 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 ++++---- Koha/Schema/Result/Statistic.pm | 8 ++++---- installer/data/mysql/atomicupdate/bug_5458.sql | 4 ---- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 8 files changed, 31 insertions(+), 25 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_5458.sql diff --git a/Koha.pm b/Koha.pm index f506553d66..4d1ef91896 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 = "18.05.04.000"; +$VERSION = "18.05.04.001"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/BranchTransferLimit.pm b/Koha/Schema/Result/BranchTransferLimit.pm index a704c68ff9..7f5bdb4c9a 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.07042 @ 2018-09-26 16:15:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wKere4dleMGrs9RO59qx9Q # 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..5df7ec6034 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.07042 @ 2018-09-26 16:15:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0hBp2R7AMxgHLLZcG/676w # 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 2eff4e9b36..33f1935a4b 100644 --- a/Koha/Schema/Result/Deleteditem.pm +++ b/Koha/Schema/Result/Deleteditem.pm @@ -235,7 +235,7 @@ __PACKAGE__->table("deleteditems"); data_type: 'varchar' is_nullable: 1 - size: 10 + size: 80 =head2 materials @@ -375,7 +375,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 => "mediumtext", is_nullable => 1 }, "uri", @@ -407,8 +407,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("itemnumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-18 16:41:11 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xb11fPjp5PyXU7yfFWHycw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-26 16:15:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:L7G0HG5gvgyhfpKb7LcUFw # 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 cee25520cc..bcfd383404 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -239,7 +239,7 @@ __PACKAGE__->table("items"); data_type: 'varchar' is_nullable: 1 - size: 10 + size: 80 =head2 materials @@ -389,7 +389,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 => "mediumtext", is_nullable => 1 }, "uri", @@ -687,8 +687,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-18 16:41:12 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CrNXvpDUvvcuPZK2Gfzs/Q +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-26 16:15:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d5sg0dXWdq0NkHsYchyUyw __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); diff --git a/Koha/Schema/Result/Statistic.pm b/Koha/Schema/Result/Statistic.pm index 20b55f3944..45fe021a0e 100644 --- a/Koha/Schema/Result/Statistic.pm +++ b/Koha/Schema/Result/Statistic.pm @@ -95,7 +95,7 @@ __PACKAGE__->table("statistics"); data_type: 'varchar' is_nullable: 1 - size: 10 + size: 80 =cut @@ -129,12 +129,12 @@ __PACKAGE__->add_columns( "associatedborrower", { data_type => "integer", is_nullable => 1 }, "ccode", - { data_type => "varchar", is_nullable => 1, size => 10 }, + { data_type => "varchar", is_nullable => 1, size => 80 }, ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RI3X/GXlBlUEgG0oxToIIA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-26 16:15:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OECp3uSP488L8TUoS1HseQ # You can replace this text with custom content, and it will be preserved on regeneration 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 ea0edbdaae..2750d99a44 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -16180,10 +16180,20 @@ if( CheckVersion( $DBversion ) ) { $DBversion = "18.05.04.000"; if ( CheckVersion($DBversion) ) { + B SetVersion ($DBversion); print "Upgrade to $DBversion done (18.05.04 release)\n"; } +$DBversion = '18.05.04.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"; +} # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.20.1