- Patch #37373 by killes: bugfix: vocabulary_node_types was broken.

4.7.x
Dries Buytaert 2006-01-10 12:26:46 +00:00
parent 08098a34f3
commit f36b456c1a
3 changed files with 17 additions and 2 deletions

View File

@ -822,7 +822,7 @@ CREATE TABLE vocabulary (
CREATE TABLE vocabulary_node_types (
vid int(10) unsigned NOT NULL DEFAULT '0',
type varchar(16) NOT NULL DEFAULT '',
type varchar(32) NOT NULL DEFAULT '',
PRIMARY KEY (vid, type)
) TYPE=MyISAM;

View File

@ -819,7 +819,7 @@ CREATE TABLE vocabulary (
CREATE TABLE vocabulary_node_types (
vid integer NOT NULL default '0',
type varchar(16) NOT NULL default '',
type varchar(32) NOT NULL default '',
PRIMARY KEY (vid, type)
);

View File

@ -1406,3 +1406,18 @@ function system_update_166() {
return $ret;
}
function system_update_167() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
$ret[] = update_sql("ALTER TABLE {vocabulary_node_types} CHANGE type varchar(32) NOT NULL default ''");
break;
case 'pgsql':
db_change_column($ret, 'vocabulary_node_types', 'type', 'type', 'varchar(32)', array('not null' => TRUE, 'default' => "''"));
break;
}
return $ret;
}