Skip to content

Commit

Permalink
Increase column size (admin table) on DB (#866)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
aulona1 committed May 3, 2022
1 parent 1659155 commit 3122bd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public_html/lists/admin/structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
),
'admin' => array(
'id' => array('integer not null primary key auto_increment', 'sys:ID'),
'loginname' => array('varchar(25) not null', 'Login Name (max 25 chars)'),
'loginname' => array('varchar(66) not null', 'Login Name (max 66 chars)'),
'namelc' => array('varchar(255)', 'sys:Normalised loginname'),
'email' => array('varchar(255) not null', 'Email'),
'created' => array('datetime', 'sys:Time Created'),
Expand Down Expand Up @@ -523,4 +523,4 @@

);

$DBstruct = $DBstructuser + $DBstructphplist; # order of tables is essential for smooth upgrade
$DBstruct = $DBstructuser + $DBstructphplist; # order of tables is essential for smooth upgrade
5 changes: 5 additions & 0 deletions public_html/lists/admin/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,11 @@ function output($message)
Sql_Query(sprintf('update %s set template_text="[CONTENT]"',
$GLOBALS['tables']['template']));
}
//#increase size 'loginname' for the sso plugin

if (version_compare($dbversion, '3.6.8','<')) {
Sql_Query("alter table {$GLOBALS['tables']['admin']} change column loginname loginname varchar(66) default ''");
}

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

0 comments on commit 3122bd5

Please sign in to comment.