Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.69
diff -u -p -r1.69 system.install
--- modules/system/system.install	10 Jan 2007 23:22:34 -0000	1.69
+++ modules/system/system.install	17 Jan 2007 00:59:30 -0000
@@ -561,7 +561,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 */ ");
@@ -1027,7 +1027,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)
       )");
@@ -3512,10 +3512,26 @@ function system_update_1021() {
 /**
  * @defgroup updates-5.0-to-x.x System updates from 5.0 to x.x
  * @{
- * @todo Start this series of updates at 2000.
  */
 
 /**
+ * Increase the maximum length of variable names from 48 to 128.
+ */
+function system_update_2000() {
+   $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.
  */
