You are here

function admin_menu_install in Administration menu 5.3

Same name and namespace in other branches
  1. 8.3 admin_menu.install \admin_menu_install()
  2. 6.3 admin_menu.install \admin_menu_install()
  3. 7.3 admin_menu.install \admin_menu_install()

Implementation of hook_install().

File

./admin_menu.install, line 6

Code

function admin_menu_install() {

  // Create cache table.
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {cache_admin_menu} (\n        cid varchar(255) NOT NULL default '',\n        data longblob,\n        expire int NOT NULL default '0',\n        created int NOT NULL default '0',\n        headers text,\n        PRIMARY KEY (cid),\n        INDEX expire (expire)\n      ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {cache_admin_menu} (\n        cid varchar(255) NOT NULL default '',\n        data bytea,\n        expire int NOT NULL default '0',\n        created int NOT NULL default '0',\n        headers text,\n        PRIMARY KEY (cid)\n      )");
      db_query("CREATE INDEX {cache_admin_menu}_expire_idx ON {cache_admin_menu} (expire)");
      break;
  }
}