From e06c67044e11ffd9defc20af81d78422ff97a775 Mon Sep 17 00:00:00 2001 From: Brendan Gallagher Date: Tue, 23 Feb 2016 23:13:08 +0000 Subject: [PATCH] Bug 15517: Update DB rev (3.22.03.003) Signed-off-by: Julian Maurice --- Koha.pm | 2 +- Koha/Schema/Result/Deletedborrower.pm | 12 ++++++------ installer/data/mysql/atomicupdate/bug_15517.sql | 2 -- installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ 4 files changed, 19 insertions(+), 9 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_15517.sql diff --git a/Koha.pm b/Koha.pm index c6ef4385c6..83a382af06 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 = "3.22.03.002"; +$VERSION = "3.22.03.003"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/Deletedborrower.pm b/Koha/Schema/Result/Deletedborrower.pm index 2b409b7ce4..0632f51b79 100644 --- a/Koha/Schema/Result/Deletedborrower.pm +++ b/Koha/Schema/Result/Deletedborrower.pm @@ -293,7 +293,7 @@ __PACKAGE__->table("deletedborrowers"); data_type: 'varchar' is_nullable: 1 - size: 30 + size: 60 =head2 flags @@ -304,7 +304,7 @@ __PACKAGE__->table("deletedborrowers"); data_type: 'varchar' is_nullable: 1 - size: 30 + size: 75 =head2 opacnote @@ -511,11 +511,11 @@ __PACKAGE__->add_columns( "sex", { data_type => "varchar", is_nullable => 1, size => 1 }, "password", - { data_type => "varchar", is_nullable => 1, size => 30 }, + { data_type => "varchar", is_nullable => 1, size => 60 }, "flags", { data_type => "integer", is_nullable => 1 }, "userid", - { data_type => "varchar", is_nullable => 1, size => 30 }, + { data_type => "varchar", is_nullable => 1, size => 75 }, "opacnote", { data_type => "mediumtext", is_nullable => 1 }, "contactnote", @@ -549,8 +549,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-10-06 10:38:42 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NofxbMGIuZqlGCqvjPEI1Q +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-02-26 14:46:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EDI8cewAT21LU7zuKc6LqA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/installer/data/mysql/atomicupdate/bug_15517.sql b/installer/data/mysql/atomicupdate/bug_15517.sql deleted file mode 100644 index d2b459e570..0000000000 --- a/installer/data/mysql/atomicupdate/bug_15517.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE deletedborrowers MODIFY COLUMN userid VARCHAR(75) DEFAULT NULL; -ALTER TABLE deletedborrowers MODIFY COLUMN password VARCHAR(60) DEFAULT NULL; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index cfe0c7b01f..02de534d3a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -11466,6 +11466,18 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.22.03.003"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + ALTER TABLE deletedborrowers MODIFY COLUMN userid VARCHAR(75) DEFAULT NULL; + }); + $dbh->do(q{ + ALTER TABLE deletedborrowers MODIFY COLUMN password VARCHAR(60) DEFAULT NULL; + }); + print "Upgrade to $DBversion done (Bug 15517 - Tables borrowers and deletedborrowers differ again)\n"; + SetVersion($DBversion); +} + # 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