Commit 31ebb648 authored by Dries's avatar Dries
Browse files

- Patch #103634 by chriskennedy: variable.name only 48 charachters.

parent 79872ff1
......@@ -571,7 +571,7 @@ function system_install() {
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
db_query("CREATE TABLE {variable} (
name varchar(48) NOT NULL default '',
name varchar(128) NOT NULL default '',
value longtext NOT NULL,
PRIMARY KEY (name)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
......@@ -1047,7 +1047,7 @@ function system_install() {
)");
db_query("CREATE TABLE {variable} (
name varchar(48) NOT NULL default '',
name varchar(128) NOT NULL default '',
value text NOT NULL,
PRIMARY KEY (name)
)");
......@@ -3578,6 +3578,23 @@ function system_update_2001() {
return $ret;
}
/**
* Increase the maximum length of variable names from 48 to 128.
*/
function system_update_2002() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'pgsql':
db_change_column($ret, 'variable', 'name', 'name', 'varchar(128)', array('not null' => TRUE, 'default' => "''"));
break;
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {variable} CHANGE name name varchar(128) NOT NULL default ''");
break;
}
return $ret;
}
/**
* @} End of "defgroup updates-5.0-to-x.x"
* The next series of updates should start at 3000.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment