michaelpporter
6/15/2015 - 5:54 PM

db_field_exists

db_field_exists

  if (!db_field_exists('table', 'new_field')) {
    $field = array('type' => 'varchar', 'length' => 256, 'not null' => TRUE, 'default' => '', 'description' => 'field description');
    db_add_field('table', 'new_field', $field);
  }