function system_update_166 in Drupal 5
Same name and namespace in other branches
- 4 database/updates.inc \system_update_166()
File
- modules/
system/ system.install, line 2481
Code
function system_update_166() {
$ret = array();
$ret[] = update_sql("DROP TABLE {directory}");
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
$ret[] = update_sql("CREATE TABLE {client} (\n cid int unsigned NOT NULL auto_increment,\n link varchar(255) NOT NULL default '',\n name varchar(128) NOT NULL default '',\n mail varchar(128) NOT NULL default '',\n slogan longtext NOT NULL,\n mission longtext NOT NULL,\n users int NOT NULL default '0',\n nodes int NOT NULL default '0',\n version varchar(35) NOT NULL default'',\n created int NOT NULL default '0',\n changed int NOT NULL default '0',\n PRIMARY KEY (cid)\n )");
$ret[] = update_sql("CREATE TABLE {client_system} (\n cid int NOT NULL default '0',\n name varchar(255) NOT NULL default '',\n type varchar(255) NOT NULL default '',\n PRIMARY KEY (cid,name)\n )");
break;
case 'pgsql':
$ret[] = update_sql("CREATE TABLE {client} (\n cid SERIAL,\n link varchar(255) NOT NULL default '',\n name varchar(128) NOT NULL default '',\n mail varchar(128) NOT NULL default '',\n slogan text NOT NULL default '',\n mission text NOT NULL default '',\n users integer NOT NULL default '0',\n nodes integer NOT NULL default '0',\n version varchar(35) NOT NULL default'',\n created integer NOT NULL default '0',\n changed integer NOT NULL default '0',\n PRIMARY KEY (cid)\n )");
$ret[] = update_sql("CREATE TABLE {client_system} (\n cid integer NOT NULL,\n name varchar(255) NOT NULL default '',\n type varchar(255) NOT NULL default '',\n PRIMARY KEY (cid,name)\n )");
break;
}
return $ret;
}