summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-02-27 12:34:45 +0000
committerDries Buytaert <dries@buytaert.net>2007-02-27 12:34:45 +0000
commit31ebb648e128396c1e7974677fc6eaf354c1b1b9 (patch)
tree1031a569aa91c5b2e5c9080e203ac869b842aa00 /modules/system/system.install
parent79872ff139f9aaf597642bb8a7877df7bf4b2842 (diff)
downloadbrdo-31ebb648e128396c1e7974677fc6eaf354c1b1b9.tar.gz
brdo-31ebb648e128396c1e7974677fc6eaf354c1b1b9.tar.bz2
- Patch #103634 by chriskennedy: variable.name only 48 charachters.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install21
1 files changed, 19 insertions, 2 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index 44ecdde6d..fb35dcc6b 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -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)
)");
@@ -3579,6 +3579,23 @@ function system_update_2001() {
}
/**
+ * 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.
*/