- Patch #78732 by dopry: made it possible to use sha1 session ids
parent
d54ccd4f84
commit
241cb08d83
|
@ -391,7 +391,7 @@ function system_install() {
|
|||
|
||||
db_query("CREATE TABLE {sessions} (
|
||||
uid int unsigned NOT NULL,
|
||||
sid varchar(32) NOT NULL default '',
|
||||
sid varchar(64) NOT NULL default '',
|
||||
hostname varchar(128) NOT NULL default '',
|
||||
timestamp int NOT NULL default '0',
|
||||
cache int NOT NULL default '0',
|
||||
|
@ -822,7 +822,7 @@ function system_install() {
|
|||
|
||||
db_query("CREATE TABLE {sessions} (
|
||||
uid int_unsigned NOT NULL,
|
||||
sid varchar(32) NOT NULL default '',
|
||||
sid varchar(64) NOT NULL default '',
|
||||
hostname varchar(128) NOT NULL default '',
|
||||
timestamp int NOT NULL default '0',
|
||||
cache int NOT NULL default '0',
|
||||
|
@ -3323,6 +3323,20 @@ function system_update_1012() {
|
|||
return $ret;
|
||||
}
|
||||
|
||||
function system_update_1013() {
|
||||
$ret = array();
|
||||
switch ($GLOBALS['db_type']) {
|
||||
case 'mysql':
|
||||
case 'mysqli':
|
||||
$ret[] = update_sql('ALTER TABLE {sessions} CHANGE COLUMN sid sid varchar(64)');
|
||||
break;
|
||||
case 'pgsql':
|
||||
$ret[] = update_sql('ALTER TABLE {sessions} ALTER COLUMN sid TYPE varchar(64)');
|
||||
break;
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "defgroup updates-4.7-to-x.x"
|
||||
* The next series of updates should start at 2000.
|
||||
|
|
Loading…
Reference in New Issue