You are here

function feedback_update_5202 in Feedback 5.2

Add column for absolute URL.

File

./feedback.install, line 95

Code

function feedback_update_5202() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {feedback} ADD url text NOT NULL AFTER location_masked");
      $ret[] = update_sql("UPDATE {feedback} SET url = location");
      break;
    case 'pgsql':
      db_add_column($ret, 'feedback', 'url', 'text', array(
        'not null' => TRUE,
      ));
      $ret[] = update_sql("UPDATE {feedback} SET url = location");
      break;
  }
  return $ret;
}