<?php
// $Id: sms_list.install,v 1.3 2010/08/30 05:15:15 abhisheknagar Exp $

/**
 * Implementation of hook_install().
 */
function sms_list_install() {
  drupal_install_schema('sms_list');
}

/**
 * Implementation of hook_schema().
 */
function sms_list_schema() {
  $schema['sms_list'] = array(
    'fields' => array(
    'status'    => array('type' => 'int', 'not null' => TRUE, 'length' => 11),
      'name'    => array('type' => 'varchar', 'not null' => TRUE, 'length' => 32),
      'number'    => array('type' => 'varchar', 'not null' => TRUE, 'length' => 32),
      'code'      => array('type' => 'varchar', 'not null' => TRUE, 'length' => 16),
      'subscribe'      => array('type' => 'int', 'not null' => TRUE, 'length' => 11),
      'gateway'   => array('type' => 'text'),
    ),
    'primary key' => array('name', 'number'),
    'unique key'  => array('number'),
      );
  
  	 $schema['sms_list_send'] = array(
    'fields' => array(
      'sid' =>	array('type' => 'serial', 'not null' => TRUE, 'length' => 20),
      'message'    => array('type' => 'varchar', 'not null' => TRUE, 'length' => 255),
      'count'      => array('type' => 'varchar', 'not null' => TRUE, 'length' => 16),
      'timestamp' => array('type' => 'int', 'not null' => TRUE, 'length' => 11),
    ),
    'primary key' => array('sid'),
    );
  
  
  return $schema;
}

/**
 * Implementation of hook_uninstall().
 */
function sms_list_uninstall() {
  drupal_uninstall_schema('sms_list');
}
