You are here

function hubspot_update_7201 in HubSpot 7.2

Same name and namespace in other branches
  1. 7.3 hubspot.install \hubspot_update_7201()

Initial introduction of the schema.

File

./hubspot.install, line 33
Installation file for hubspot.

Code

function hubspot_update_7201() {
  $schema['hubspot'] = array(
    'description' => 'Base table for hubspot. Stores field mappings from webform fields to hubspot form fields.',
    'fields' => array(
      'nid' => array(
        'description' => 'The node id of the webform for this row.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'hubspot_guid' => array(
        'description' => 'The hubspot form guid for this row.',
        'type' => 'text',
      ),
      'webform_field' => array(
        'description' => 'The webform field key for this row.',
        'type' => 'text',
      ),
      'hubspot_field' => array(
        'description' => 'The hubspot field key for this row.',
        'type' => 'text',
      ),
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
        array(
          'hubspot_guid',
          128,
        ),
        array(
          'webform_field',
          128,
        ),
        array(
          'hubspot_field',
          128,
        ),
      ),
    ),
  );
  db_create_table('hubspot', $schema['hubspot']);
}