@@ -, +, @@ --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletions(-) --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -301,7 +301,7 @@ DROP TABLE IF EXISTS `borrower_attributes`; CREATE TABLE `borrower_attributes` ( -- values of custom patron fields known as extended patron attributes linked to patrons/borrowers `borrowernumber` int(11) NOT NULL, -- foreign key from the borrowers table, defines which patron/borrower has this attribute `code` varchar(10) NOT NULL, -- foreign key from the borrower_attribute_types table, defines which custom field this value was entered for - `attribute` varchar(64) default NULL, -- custom patron field value + `attribute` varchar(255) default NULL, -- custom patron field value `password` varchar(64) default NULL, -- password associated with this field KEY `borrowernumber` (`borrowernumber`), KEY `code_attribute` (`code`, `attribute`), --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -5556,6 +5556,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion ="3.09.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("ALTER TABLE `borrower_attributes` CHANGE `attribute` `attribute` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL"); + print "Upgrade to $DBversion done (Increase the maximum size of a borrower attribute value)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --