<?php
// $Id: nat.install,v 1.3 2006/04/16 22:32:38 karthik Exp $

/**
 * Implementation of hook_install().
 */
function nat_install() {
  $ret = array();

  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      $ret[] = db_query("CREATE TABLE {nat} (
        nid int(11) NOT NULL default 0,
        tid int(11) NOT NULL default 0,
        KEY nid (nid))
        COMMENT='NAT module: establish relationship between nids and tids.'
        /*!40100 default CHARACTER SET utf8 */"
      );
      break;
    case 'pgsql':
      $ret[] = db_query("CREATE TABLE {nat} (
        nid integer NOT NULL default 0,
        tid integer NOT NULL default 0)"
      );
      $ret[] = db_query("CREATE INDEX {nat}_nid_idx ON {nat}(nid)");
  }

  return $ret;
}
