You are here

function commerce_registration_schema in Commerce Registration 7.3

Same name and namespace in other branches
  1. 7.2 commerce_registration.install \commerce_registration_schema()

@file Commerce Registration install file.

Modify the registration schema to accommodate a commerce line item ID number.

File

./commerce_registration.install, line 9
Commerce Registration install file.

Code

function commerce_registration_schema() {
  $schema = array();
  $schema['commerce_registration_settings'] = array(
    'description' => 'Entity specific settings for Commerce Registration.',
    'fields' => array(
      'entity_type' => array(
        'type' => 'varchar',
        'length' => '100',
        'not null' => TRUE,
        'description' => 'The entity type.',
      ),
      'entity_id' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => 'The entity\'s unique ID',
      ),
      'entity_bundle' => array(
        'type' => 'varchar',
        'length' => '100',
        'description' => 'The bundle for the entity, or NULL if the settings apply to all bundles of the entity type.',
      ),
      'settings' => array(
        'type' => 'text',
        'size' => 'big',
        'serialize' => TRUE,
      ),
    ),
    'unique_keys' => array(
      'entity' => array(
        'entity_type',
        'entity_id',
        'entity_bundle',
      ),
    ),
  );
  return $schema;
}