You are here

function pardot_update_7100 in Pardot Integration 7

Same name and namespace in other branches
  1. 7.2 pardot.install \pardot_update_7100()

Update Pardot Campaign and Pardot Scoring tables.

File

./pardot.install, line 171
Install/uninstall taks and updates.

Code

function pardot_update_7100(&$sandbox) {

  // Change old field (if necessary).
  if (!db_field_exists('pardot_submissions', 'form_nid')) {
    db_change_field('pardot_submissions', 'form_nid_field', 'form_nid', array(
      'description' => 'Webform nid that generated this post',
      'type' => 'int',
      'size' => 'normal',
      'unsigned' => TRUE,
      'not null' => TRUE,
      'default' => 0,
    ));
    return t('The Pardot tables were updated.');
  }
  else {
    return t('The pardot_submissions field "form_nid" already exists, no change needed.');
  }
}