You are here

function commerce_product_ui_schema in Commerce Core 7

Implements hook_schema().

File

modules/product/commerce_product_ui.install, line 21

Code

function commerce_product_ui_schema() {
  $schema = array();
  $schema['commerce_product_type'] = array(
    'description' => 'Stores information about {commerce_product} types created via Product UI.',
    'fields' => array(
      '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' => '',
      ),
      'description' => array(
        'description' => 'A brief description of this type.',
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'medium',
      ),
      'help' => array(
        'description' => 'Help information shown to the user when creating a {commerce_product} of this type.',
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'medium',
      ),
      'revision' => array(
        'description' => 'Determine whether to create a new revision when a product of this type is updated.',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 1,
      ),
    ),
    'primary key' => array(
      'type',
    ),
  );
  return $schema;
}