<?php
// $Id$

function products_schema(){
	$schema['products'] = array(
	'description' => t('HOLDS THE DETAILS OF ALL THE PRODUCTS .'),
    'fileds' => array(
		'productcode' => array(
			'description' => t('Contains THE CODE for the product'),
			'type' => 'varchar',
			 'length' => 255,
			'not null' => TRUE
		),
		'productname' => array(
			'description' => t('Contains THE NAME for the product'),
			'type' => 'text',
			'not null' => TRUE
		),
		'producttype' => array(
			'description' => t('Contains THE TYPE for the product'),
			'type' => 'text',
			'not null' => TRUE
		)
	),
	'primary key' => array('productcode')
	);
	
	return $schema;

}


function products_update_6200(){

  $ret=array();
  
  db_create_table($ret,'products',array(
  'description' => t('HOLDS THE DETAILS OF ALL THE PRODUCTS .'),
  'fileds=>array(
		'productcode' => array(
			'description' => t('Contains THE CODE for the product'),
			'type' => 'varchar',
			      'length' => 255,
			'not null' => TRUE
		),
		'productname' => array(
			'description' => t('Contains THE NAME for the product'),
			'type' => 'text',
			'not null' => TRUE
		),
		'producttype' => array(
			'description' => t('Contains THE TYPE for the product'),
			'type' => 'text',
			'not null' => TRUE
		)
	),
	'primary key' => array('productcode')
			)
		);
	
	
	


}


//standard functions to create and destroy
//the tables on install and uninstall
function products_install() {
	//create shift_scheduler tables	
	drupal_install_schema('products');
}

function products_uninstall(){
	//drop shift_scheduler talbes
  drupal_uninstall_schema('products');
}
