atrblacklist.install

<?php
// $Id: atrblacklist.install,v 1.1.2.1 2009/07/31 00:43:10 xano Exp $

/**
 * @file
 *   Installation and uninstallation functions.
 */

/**
 * Implementation of hook_schema().
 */
function atrblacklist_schema() {
  return array(
    'atrblacklist_keyword' => array(
      'description' => 'Words or phrases that are blacklisted.',
      'fields' => array(
        'pid' => array(
          'description' => 'The {atr_profile}.pid of this record.',
          'type' => 'int',
          'unsigned' => TRUE,
          'not null' => TRUE,
        ),
        'keyword' => array(
          'description' => 'The keyword that is blacklisted.',
          'type' => 'varchar',
          'length' => 255,
          'not null' => TRUE,
        ),
        'comment' => array(
          'description' => 'A comment providing extra information about the keyword.',
          'type' => 'text',
          'size' => 'medium',
          'not null' => TRUE,
        ),
      ),
    ),
    'atrblacklist_string' => array(
      'description' => 'The strings that match blacklisted keywords.',
      'fields' => array(
        'sid' => array(
          'description' => 'The {atr_string}.sid of this record.',
          'type' => 'int',
          'unsigned' => TRUE,
          'not null' => TRUE,
        ),
        'keyword' => array(
          'description' => 'The {atrblacklist_keyword}.keyword this string matches.',
          'type' => 'varchar',
          'length' => 255,
          'not null' => TRUE,
        ),
      ),
    ),
  );
}

/**
 * Implementation of hook_install().
 */
function atrblacklist_install() {
  drupal_install_schema('atrblacklist');
}

/**
 * Implementation of hook_uninstall().
 */
function atrblacklist_uninstall() {
  drupal_uninstall_schema('atrblacklist');
}