| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 | <?php// $Id: uc_atctweaks.install,v 1.1 2009/05/19 18:53:48 rszrama Exp $/** * @file * Installs the necessary table for the Add to Cart Tweaks product features. *//** * Implementation of hook_schema() */function uc_atctweaks_schema() {  $schema = array();  $schema['uc_atctweaks_products'] = array(    'fields' => array(      'vpid' => array(        'type' => 'serial',        'unsigned' => TRUE,        'not null' => TRUE,      ),      'pfid' => array(        'type' => 'int',        'unsigned' => TRUE,        'not null' => TRUE,        'default' => 0,      ),      'cart_empty' => array(        'description' => 'Cart empty setting for this instance of the feature.',        'type' => 'int',        'size' => 'small',        'not null' => TRUE,        'default' => 0,      ),      'redirect' => array(        'description' => 'Add to cart redirect for this instance of the feature.',        'type' => 'varchar',        'length' => 255,        'not null' => TRUE,        'default' => '',      ),    ),    'indexes' => array(      'pfid' => array('pfid'),    ),    'primary key' => array('vpid'),  );  return $schema;}/** * Implementation of hook_uninstall() */function uc_atctweaks_uninstall() {  db_delete('uc_product_features')    ->condition('fid', 'atctweaks')    ->execute();}
 |