function uc_varprice_schema in UC Variable Price 7
Same name and namespace in other branches
- 6 uc_varprice.install \uc_varprice_schema()
Implementation of hoook_schema()
File
- ./
uc_varprice.install, line 12 - Installs the necessary table for the Variable Price product features.
Code
function uc_varprice_schema() {
$schema = array();
$schema['uc_varprice_products'] = array(
'fields' => array(
'vpid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'pfid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'price_default' => array(
'description' => 'Default product price.',
'type' => 'numeric',
'precision' => 10,
'scale' => 2,
'not null' => TRUE,
'default' => 0.0,
),
'price_minimum' => array(
'description' => 'Minimum product price.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'price_maximum' => array(
'description' => 'Maximum product price.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'add_to_cart_title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'amount_title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'indexes' => array(
'pfid' => array(
'pfid',
),
),
'primary key' => array(
'vpid',
),
);
return $schema;
}