You are here

function system_update_166 in Drupal 4

Same name and namespace in other branches
  1. 5 modules/system/system.install \system_update_166()

File

database/updates.inc, line 1371

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(10) 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(10) NOT NULL default '0',\n        nodes int(10) NOT NULL default '0',\n        version varchar(35) NOT NULL default'',\n        created int(11) NOT NULL default '0',\n        changed int(11) NOT NULL default '0',\n        PRIMARY KEY (cid)\n      )");
      $ret[] = update_sql("CREATE TABLE {client_system} (\n        cid int(10) 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;
}