function uc_restrict_qty_schema in Ubercart Restrict Qty 6.2
Same name and namespace in other branches
- 7 uc_restrict_qty.install \uc_restrict_qty_schema()
Define the table structures.
Return value
The schema which contains the structure for the uc_restrict_qty module's tables.
File
- ./
uc_restrict_qty.install, line 14 - uc_restrict_qty module install file.
Code
function uc_restrict_qty_schema() {
$schema['uc_restrict_qty_products'] = array(
'fields' => array(
'rqpid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'pfid' => array(
'description' => t('The ID of the product feature this is attached to.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'nid' => array(
'description' => t('The ID of the node this role feature is attached to.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'model' => array(
'description' => t('The product model.'),
'type' => 'varchar',
'length' => 255,
'default' => NULL,
),
'qty' => array(
'description' => t('The quantity restriction.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'lifetime' => array(
'description' => t('Is restriction lifetime?'),
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 1,
),
),
'indexes' => array(
'nid' => array(
'nid',
),
'model' => array(
'model',
),
),
'primary key' => array(
'rqpid',
),
);
return $schema;
}