function location_update_5300 in Location 6.3
Same name and namespace in other branches
- 5.3 location.install \location_update_5300()
- 7.5 location.install \location_update_5300()
- 7.3 location.install \location_update_5300()
- 7.4 location.install \location_update_5300()
Location 3.x update 1. Add location specific cache table.
File
- ./
location.install, line 528 - Installation / uninstallation routines.
Code
function location_update_5300() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("CREATE TABLE {cache_location} (\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':
$ret[] = update_sql("CREATE TABLE {cache_location} (\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 )");
$ret[] = update_sql("CREATE INDEX {cache_location}_expire_idx ON {cache_location} (expire)");
break;
}
return $ret;
}