<?php
// $Id: weburl.install,v 1.2 2006/03/11 22:08:35 JonBob Exp $

/**
 * Implementation of hook_install().
 */
function weburl_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {node_field_weburl_data} (
          nid int unsigned NOT NULL default '0',
          vid int unsigned NOT NULL default '0',
          field_name varchar(32) NOT NULL default '',
          delta int unsigned NOT NULL default '0',
          field_weburl varchar(255) NOT NULL default '',
          PRIMARY KEY  (vid,field_name,delta)
        ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;

    case 'pgsql':
      db_query("CREATE TABLE {node_field_weburl_data} (
          nid integer unsigned NOT NULL default '0',
          vid integer unsigned NOT NULL default '0',
          field_name varchar(32) NOT NULL default '',
          delta integer unsigned NOT NULL default '0',
          field_weburl varchar(255) NOT NULL default '',
          PRIMARY KEY  (vid,field_name,delta)
        )");
      break;
  }
}
