function nat_install in Node Auto Term [NAT] 5
Same name and namespace in other branches
- 6.2 nat.install \nat_install()
- 6 nat.install \nat_install()
- 7.2 nat.install \nat_install()
- 7 nat.install \nat_install()
Implementation of hook_install().
File
- ./
nat.install, line 6
Code
function nat_install() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
db_query("CREATE TABLE {nat} (\n nid int NOT NULL default 0,\n tid int NOT NULL default 0,\n vid int NOT NULL default 0,\n KEY nid (nid))\n COMMENT = 'NAT module: establish relationship between nids and tids.'\n /*!40100 default CHARACTER SET utf8 */");
break;
case 'pgsql':
db_query("CREATE TABLE {nat} (\n nid integer NOT NULL default 0,\n tid integer NOT NULL default 0,\n vid integer NOT NULL default 0)");
db_query("CREATE INDEX {nat}_nid_idx ON {nat}(nid)");
}
return $ret;
}