You are here

function feedback_update_5200 in Feedback 5.2

Add location_masked column to {feedback} table.

File

./feedback.install, line 57

Code

function feedback_update_5200() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {feedback} ADD location_masked text NOT NULL AFTER location");
      $ret[] = update_sql("ALTER TABLE {feedback} ADD KEY location_masked (location_masked(32))");
      break;
    case 'pgsql':
      db_add_column($ret, 'feedback', 'location_masked', 'text', array(
        'not null' => TRUE,
      ));
      $ret[] = update_sql("CREATE INDEX {feedback}_location_masked_idx ON {feedback} (location_masked)");
      break;
  }
  return $ret;
}