<?php
// $Id: bot_factoid.install,v 1.1.2.3 2008/01/30 13:50:51 morbus Exp $

/**
 * Implementation of hook_schema().
 */
function bot_factoid_schema() {
  $schema['bot_factoid'] = array(
    'description' => t('The single table necessary for factoid storage.'),
    'fields' => array(
      'subject' => array(
        'default'     => '',
        'description' => t('The word or phrase this factoid is about.'),
        'length'      => 255,
        'not null'    => TRUE,
        'type'        => 'varchar',
      ),
      'is_are' => array(
        'default'     => '',
        'description' => t('The determinant of whether this factoid is singular or plural.'),
        'length'      => 3,
        'not null'    => TRUE,
        'type'        => 'varchar',
      ),
      'statement' => array(
        'default'     => '',
        'description' => t('The factoid defined for this subject.'),
        'not null'    => TRUE,
        'size'        => 'medium',
        'type'        => 'text',
      ),
    ),
    'primary key' => array('subject'),
  );

  return $schema;
}

/**
 * Implementation of hook_install().
 */
function bot_factoid_install() {
  drupal_install_schema('bot_factoid');
}

/**
 * Implementation of hook_uninstall().
 */
function bot_factoid_uninstall() {
  drupal_uninstall_schema('bot_factoid');
  variable_del('bot_factoid_stopwords');
}
