<?php
// \$Id\$

/**
 * Implementation of hook_install().
 */
function cave_install() {
  drupal_install_schema('cave');
}

/**
 * Implementation of hook_uninstall().
 */
function cave_uninstall() {
  drupal_uninstall_schema('cave');
}

/**
 * Implementation of hook_schema().
 */
function cave_schema() {
  $schema['cave_tracker'] = array(
    'description' => 'Stores ips against nids/cids.',
    'fields' => array(
      'type' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The sort of created item.',
      ),
      'id' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The Node/Comment ID',
      ),
      'ip' => array(
        'type' => 'int',
        'size' => 'big',
        'not null' => TRUE,
        'description' => 'The User IP address',
      ),
    ),
    'primary key' => array('id', 'type'),
  );
  return $schema;
}
