You are here

function commerce_customer_field_schema in Commerce Core 7

Implements hook_field_schema().

File

modules/customer/commerce_customer.install, line 154

Code

function commerce_customer_field_schema($field) {
  if ($field['type'] == 'commerce_customer_profile_reference') {
    return array(
      'columns' => array(
        'profile_id' => array(
          'type' => 'int',
          'unsigned' => TRUE,
          'not null' => FALSE,
        ),
      ),
      'indexes' => array(
        'profile_id' => array(
          'profile_id',
        ),
      ),
      'foreign keys' => array(
        'profile_id' => array(
          'table' => 'commerce_customer_profile',
          'columns' => array(
            'profile_id' => 'profile_id',
          ),
        ),
      ),
    );
  }
}