You are here

function paymentreference_schema in Payment 7

Implements hook_schema().

File

modules/paymentreference/paymentreference.install, line 11
Installation and uninstallation functions.

Code

function paymentreference_schema() {
  $schema['paymentreference'] = array(
    'fields' => array(
      'bundle' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
      ),
      'entity_type' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
      'field_name' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
      'pid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'pid',
    ),
    'foreign keys' => array(
      'pid' => array(
        'table' => 'payment',
        'columns' => array(
          'pid' => 'pid',
        ),
      ),
    ),
    'indexes' => array(
      'instance' => array(
        'bundle',
        'entity_type',
        'field_name',
      ),
    ),
  );
  return $schema;
}