You are here

function sf_prematch_schema in Salesforce Suite 7

Same name and namespace in other branches
  1. 6.2 sf_prematch/sf_prematch.install \sf_prematch_schema()
  2. 7.2 sf_prematch/sf_prematch.install \sf_prematch_schema()

Implementation of hook_schema().

File

sf_prematch/sf_prematch.install, line 25
Installs tables needed for sf_prematch module.

Code

function sf_prematch_schema() {
  $schema['salesforce_prematch'] = array(
    'description' => t('Drupal to Salesforce object mapping table for pre-creation '),
    'fields' => array(
      'fieldmap' => array(
        'description' => 'Fieldmap id FK',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => '0',
      ),
      'primary_field' => array(
        'description' => 'Primary field or object name for use in prematching.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'secondary_field' => array(
        'description' => 'Secondary field or object name for use in prematching.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => false,
        'default' => '',
      ),
      'tertiary_field' => array(
        'description' => 'Tertiary field or object name for use in prematching.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => false,
        'default' => '',
      ),
      'rule' => array(
        'description' => 'Int identifying rule for prematching (based on constants)',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'fieldmap',
    ),
  );
  return $schema;
}