You are here

eloqua.install in Eloqua 6

Same filename and directory in other branches
  1. 7.2 eloqua.install
  2. 7 eloqua.install

File

eloqua.install
View source
<?php

module_load_include('inc', 'eloqua');
function eloqua_schema() {
  $schema = array();
  $schema[ELOQUA_SCHEMA_SAVED_POSTS] = array(
    'description' => t('Webform Settings'),
    'primary key' => array(
      ELOQUA_POST_FIELD_POST_ID,
    ),
    'unique keys' => array(),
    'indexes' => array(
      ELOQUA_SCHEMA_SAVED_POSTS . '_form_id' => array(
        ELOQUA_POST_FIELD_FORM_ID,
      ),
    ),
    'fields' => array(
      ELOQUA_POST_FIELD_FORM_ID => array(
        // Associated Form Id
        'description' => 'Form ID that generated this post',
        'type' => 'varchar',
        'size' => 'normal',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      ELOQUA_POST_FIELD_POST_ID => array(
        // Serial Number
        'type' => 'serial',
        'size' => 'normal',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      ELOQUA_POST_FIELD_STATUS => array(
        // Form Posted Status
        'description' => 'Eloqua option name',
        'type' => 'varchar',
        'size' => 'normal',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      ELOQUA_POST_FIELD_POST_TIME => array(
        // Post Time
        'description' => 'Node Id',
        'type' => 'int',
        'size' => 'normal',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      ELOQUA_POST_FIELD_DATA => array(
        // Form Contents
        'description' => 'Extra data to be stored with the field',
        'type' => 'text',
        'size' => 'normal',
        /* 16KB in mySql */
        'not null' => TRUE,
        'default' => '',
      ),
    ),
  );
  $schema[ELOQUA_SCHEMA_WEBFORM] = array(
    'description' => t('Webform Settings'),
    'primary key' => array(
      ELOQUA_WEBFORM_FIELD_NODE_ID,
    ),
    'unique keys' => array(),
    'indexes' => array(
      ELOQUA_SCHEMA_WEBFORM . '_active' => array(
        ELOQUA_WEBFORM_FIELD_ACTIVE,
      ),
    ),
    'fields' => array(
      ELOQUA_WEBFORM_FIELD_NODE_ID => array(
        // Webform Node Id
        'description' => 'Node Id',
        'type' => 'int',
        'size' => 'normal',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      ELOQUA_WEBFORM_FIELD_FORM_NAME => array(
        // Eloqua Form Name
        'description' => 'Eloqua form name',
        'type' => 'varchar',
        'size' => 'normal',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      ELOQUA_WEBFORM_FIELD_ACTIVE => array(
        // Is this webform eloqua enabled
        'description' => 'Whether this form is eloqua active',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => TRUE,
      ),
      ELOQUA_WEBFORM_FIELD_DATA => array(
        'description' => 'Extra data to be stored with the field',
        'type' => 'text',
        'size' => 'normal',
        /* 16KB in mySql */
        'not null' => TRUE,
        'default' => '',
      ),
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_install().
 */
function eloqua_install() {
  drupal_install_schema('eloqua');
}

/**
 * Implementation of hook_uninstall().
 */
function eloqua_uninstall() {
  drupal_uninstall_schema('eloqua');
}

Functions

Namesort descending Description
eloqua_install Implementation of hook_install().
eloqua_schema
eloqua_uninstall Implementation of hook_uninstall().