You are here

function uc_flatrate_update_3 in Ubercart 5

File

shipping/uc_flatrate/uc_flatrate.install, line 161

Code

function uc_flatrate_update_3() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {uc_flatrate_products} DROP PRIMARY KEY, ADD PRIMARY KEY (`vid`, `mid`)");
      break;
    case 'pgsql':
      $ret[] = update_sql("ALTER TABLE {uc_flatrate_products} DROP CONSTRAINT {uc_flatrate_products}_pkey, ADD PRIMARY KEY (vid, mid)");
      break;
  }
  return $ret;
}