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(
'description' => 'Form ID that generated this post',
'type' => 'varchar',
'size' => 'normal',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
ELOQUA_POST_FIELD_POST_ID => array(
'type' => 'serial',
'size' => 'normal',
'unsigned' => TRUE,
'not null' => TRUE,
),
ELOQUA_POST_FIELD_STATUS => array(
'description' => 'Eloqua option name',
'type' => 'varchar',
'size' => 'normal',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
ELOQUA_POST_FIELD_POST_TIME => array(
'description' => 'Node Id',
'type' => 'int',
'size' => 'normal',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
ELOQUA_POST_FIELD_DATA => array(
'description' => 'Extra data to be stored with the field',
'type' => 'text',
'size' => 'normal',
'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(
'description' => 'Node Id',
'type' => 'int',
'size' => 'normal',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
ELOQUA_WEBFORM_FIELD_FORM_NAME => array(
'description' => 'Eloqua form name',
'type' => 'varchar',
'size' => 'normal',
'length' => 64,
'not null' => TRUE,
'default' => '',
),
ELOQUA_WEBFORM_FIELD_ACTIVE => array(
'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',
'not null' => TRUE,
'default' => '',
),
),
);
return $schema;
}
function eloqua_install() {
drupal_install_schema('eloqua');
}
function eloqua_uninstall() {
drupal_uninstall_schema('eloqua');
}