Some libraries use email ids as userids. The current length of the userid field
is 30 and is not sufficient to accomodate some email addresses.
This change will increase the length to 75.
---
installer/data/mysql/kohastructure.sql | 2 +-
installer/data/mysql/updatedatabase.pl | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/installer/data/mysql/kohastructure.sql
b/installer/data/mysql/kohastructure.sql
index 13fa53d..d5c91e4 100644
--- a/installer/data/mysql/kohastructure.sql
+++ b/installer/data/mysql/kohastructure.sql
@@ -244,7 +244,7 @@ CREATE TABLE `borrowers` (
`sex` varchar(1) default NULL,
`password` varchar(30) default NULL,
`flags` int(11) default NULL,
- `userid` varchar(30) default NULL,
+ `userid` varchar(75) default NULL,
`opacnote` mediumtext,
`contactnote` varchar(255) default NULL,
`sort1` varchar(80) default NULL,
diff --git a/installer/data/mysql/updatedatabase.pl
b/installer/data/mysql/updatedatabase.pl
index bdfc9ac..76540ca 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -4439,6 +4439,14 @@ if (C4::Context->preference("Version") <
TransformToNum($DBversion)) {
SetVersion($DBversion);
}
+$DBversion = "3.05.00.XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE `borrowers` MODIFY `userid` VARCHAR(75)");
+ print "Modified userid column length into 75 in borrowers\n";
+ SetVersion($DBversion);
+}
+
+
=head1 FUNCTIONS
--
1.6.4.2
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/