You are here

function pardot_update_6004 in Pardot Integration 6

Add page scoring support.

File

./pardot.install, line 284

Code

function pardot_update_6004() {
  $ret = array();
  $schema['pardot_scoring'] = array(
    'description' => t('Scoring settings'),
    'primary key' => array(
      'scoring_id',
    ),
    'unique keys' => array(
      'pardot_path' => array(
        'path',
      ),
    ),
    'indexes' => array(),
    'fields' => array(
      'scoring_id' => array(
        // Internal unique identifier.
        'type' => 'serial',
        'size' => 'normal',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'path' => array(
        'type' => 'varchar',
        'size' => 'normal',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'score' => array(
        'description' => 'Pardot score for a given page',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
        'unsigned' => FALSE,
      ),
    ),
  );
  db_create_table($ret, 'pardot_scoring', $schema['pardot_scoring']);
  return $ret;
}