function commerce_order_types_schema in Commerce Order Types 7
Implements hook_schema().
File
- ./
commerce_order_types.install, line 10 - Install, update and uninstall functions for the Commerce Order Types module.
Code
function commerce_order_types_schema() {
$schema['commerce_order_types'] = array(
'description' => 'Stores information about Commerce Order item types created via UI.',
'primary key' => array(
'id',
),
'unique keys' => array(
'type' => array(
'type',
),
),
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique order type id.',
),
'type' => array(
'description' => 'The machine-readable name of this type.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'name' => array(
'description' => 'The human-readable name of this type.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'help' => array(
'description' => 'A brief description of this type.',
'type' => 'text',
'not null' => FALSE,
'size' => 'medium',
),
'data' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
'description' => 'A serialized array of additional data related to this order type.',
),
) + entity_exportable_schema_fields(),
);
return $schema;
}