<?php
// $Id: contentoptimizer.install,v 1.7 2010/05/09 19:21:01 tomdude48 Exp $
/**
 * @file 
 * Install include file. Implements database schema. 
*/

/**
 *  Implementation of hook_install().
 */
function contentoptimizer_install() {
  drupal_install_schema('contentoptimizer');
  drupal_set_message(st('Content Optimizer has been installed.')); 
}

/**
 * Implementation of hook_uninstall().
 */
function contentoptimizer_uninstall() {
  drupal_uninstall_schema('contentoptimizer');
  drupal_set_message(st('Content Optimizer has been uninstalled.'));  
}

/**
 *  Implementation of hook_schema
 */

function contentoptimizer_schema() {
  $schema['contentoptimizer'] = array(
    'description' => t('Creates database table for content optimizer keywords.'),
    'fields' => array(
      'aid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => t('The content analysis id.'),  
      ), //aid
      'keyword' => array(
        'type' => 'varchar',
        'length' => '128',
        'not null' => TRUE,
        'default' => '',
        'description' => t('The targeted keyword phrase for the node.'),  
      ), //keyword    
    ),
    'primary key' => array('aid'),
  ); 
  return $schema;
}