function uc_atctweaks_schema in UC Add to Cart Tweaks 6
Same name and namespace in other branches
- 7 uc_atctweaks.install \uc_atctweaks_schema()
@file Installs the necessary table for the Add to Cart Tweaks product features.
File
- ./
uc_atctweaks.install, line 8 - Installs the necessary table for the Add to Cart Tweaks product features.
Code
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' => t('Cart empty setting for this instance of the feature.'),
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
'redirect' => array(
'description' => t('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;
}