You are here

function uc_credit_update_1 in Ubercart 5

File

payment/uc_credit/uc_credit.install, line 60

Code

function uc_credit_update_1() {
  $ret[] = update_sql("ALTER TABLE {uc_payment_credit} ADD cc_bank VARCHAR(255) NOT NULL, ADD cc_type VARCHAR(255) NOT NULL");
  $max = db_result(db_query("SELECT MAX(credit_id) FROM {uc_payment_credit}"));
  if (is_numeric($max)) {
    $ret[] = update_sql("INSERT INTO {sequences} VALUES ('{uc_payment_credit}_credit_id', {$max})");
  }
  return $ret;
}