You are here

function commerce_pricing_attributes_field_schema in Commerce Pricing Attributes 7

Implements hook_field_schema().

File

./commerce_pricing_attributes.install, line 6

Code

function commerce_pricing_attributes_field_schema($field) {
  return array(
    'columns' => array(
      'set_id' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'set_details' => array(
        'type' => 'blob',
        'not null' => FALSE,
        'size' => 'big',
        'serialize' => TRUE,
        'description' => 'A serialized array of additional data.',
      ),
    ),
    'indexes' => array(
      'set_id' => array(
        'set_id',
      ),
    ),
    'foreign keys' => array(
      'set_id' => array(
        'table' => 'commerce_option_set',
        'columns' => array(
          'set_id' => 'set_id',
        ),
      ),
    ),
  );
}