pardot_webform.install in Pardot Integration 7.2
Install/uninstall taks and updates.
File
pardot_webform/pardot_webform.installView source
<?php
/**
* @file
* Install/uninstall taks and updates.
*/
/**
* Implements hook_schema().
*/
function pardot_webform_schema() {
$schema = array();
$schema['pardot_submissions'] = array(
'description' => 'Pardot Form submissions',
'primary key' => array(
'sid',
),
'fields' => array(
'sid' => array(
// Internal unique identifier.
'description' => 'Webform submission id',
'type' => 'serial',
'size' => 'normal',
'unsigned' => TRUE,
'not null' => TRUE,
),
'form_nid' => array(
// Associated form ID.
'description' => 'Webform nid that generated this post',
'type' => 'int',
'size' => 'normal',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'status' => array(
// Form posted status.
'description' => 'Pardot option name',
'type' => 'varchar',
'size' => 'normal',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'submitted' => array(
// Post time.
'description' => 'Timestamp of form submission',
'type' => 'int',
'size' => 'normal',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'data' => array(
// Form contents.
'description' => 'Form values and other data',
'type' => 'text',
'size' => 'normal',
/* 16KB in mySql */
'not null' => TRUE,
'serialize' => TRUE,
),
),
);
$schema['pardot_webform'] = array(
'description' => 'Webform Settings',
'primary key' => array(
'nid',
),
'unique keys' => array(),
'indexes' => array(
'pardot_webform_active' => array(
'is_active',
),
),
'fields' => array(
'nid' => array(
// Webform node ID.
'description' => 'Node ID',
'type' => 'int',
'size' => 'normal',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'url' => array(
'description' => 'Pardot post url',
'type' => 'varchar',
'size' => 'normal',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'is_active' => array(
// Is this webform Pardot enabled?
'description' => 'Whether this form is Pardot active',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
'unsigned' => TRUE,
),
'data' => array(
'description' => 'Extra data to be stored with the field',
'type' => 'text',
'size' => 'normal',
/* 16KB in mySql */
'not null' => TRUE,
'serialize' => TRUE,
),
),
);
return $schema;
}
Functions
Name | Description |
---|---|
pardot_webform_schema | Implements hook_schema(). |