system_update_6015

Definition

system_update_6015()
modules/system/system.install, line 1371

Description

Add the form cache table.

Code

<?php
function system_update_6015() {
  $ret = array();

  switch ($GLOBALS['db_type']) {
    case 'pgsql':
      $ret[] = update_sql("CREATE TABLE {cache_form} (
        cid varchar(255) NOT NULL default '',
        data bytea,
        expire int NOT NULL default '0',
        created int NOT NULL default '0',
        headers text,
        serialized smallint NOT NULL default '0',
        PRIMARY KEY (cid)
    )");
      $ret[] = update_sql("CREATE INDEX {cache_form}_expire_idx ON {cache_form} (expire)");
      break;
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("CREATE TABLE {cache_form} (
        cid varchar(255) NOT NULL default '',
        data longblob,
        expire int NOT NULL default '0',
        created int NOT NULL default '0',
        headers text,
        serialized int(1) NOT NULL default '0',
        PRIMARY KEY (cid),
        INDEX expire (expire)
      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
  }

  return $ret;
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.