You are here

function sf_prematch_schema in Salesforce Suite 6.2

Same name and namespace in other branches
  1. 7 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 26
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(
      'name' => array(
        'description' => 'Foreign key for salesforce_field_map name',
        'type' => 'varchar',
        'length' => 64,
      ),
      '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(
      'name',
    ),
  );
  return $schema;
}