Skip to content

Commit 3122bd5

Browse files
authored
Increase column size (admin table) on DB (#866)
* Update structure.php Increase 'loginname' max chars to 66 on admin table. * increase size 'loginname' for the sso plugin * Update dbversion and fix sql error syntax
1 parent 1659155 commit 3122bd5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

public_html/lists/admin/structure.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@
286286
),
287287
'admin' => array(
288288
'id' => array('integer not null primary key auto_increment', 'sys:ID'),
289-
'loginname' => array('varchar(25) not null', 'Login Name (max 25 chars)'),
289+
'loginname' => array('varchar(66) not null', 'Login Name (max 66 chars)'),
290290
'namelc' => array('varchar(255)', 'sys:Normalised loginname'),
291291
'email' => array('varchar(255) not null', 'Email'),
292292
'created' => array('datetime', 'sys:Time Created'),
@@ -523,4 +523,4 @@
523523

524524
);
525525

526-
$DBstruct = $DBstructuser + $DBstructphplist; # order of tables is essential for smooth upgrade
526+
$DBstruct = $DBstructuser + $DBstructphplist; # order of tables is essential for smooth upgrade

public_html/lists/admin/upgrade.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,11 @@ function output($message)
452452
Sql_Query(sprintf('update %s set template_text="[CONTENT]"',
453453
$GLOBALS['tables']['template']));
454454
}
455+
//#increase size 'loginname' for the sso plugin
456+
457+
if (version_compare($dbversion, '3.6.8','<')) {
458+
Sql_Query("alter table {$GLOBALS['tables']['admin']} change column loginname loginname varchar(66) default ''");
459+
}
455460

456461
//# longblobs are better at mixing character encoding. We don't know the encoding of anything we may want to store in cache
457462
//# before converting, it's quickest to clear the cache

0 commit comments

Comments
 (0)