You are here

function uc_store_update_6005 in Ubercart 6.2

Remove auto-increment from uc_countries.country_id.

File

uc_store/uc_store.install, line 262
Install, update, and uninstall functions for the uc_store module.

Code

function uc_store_update_6005() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_change_field($ret, 'uc_countries', 'country_id', 'country_id', array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ));
      break;
    case 'pgsql':
      db_drop_primary_key($ret, 'uc_countries');
      db_change_field($ret, 'uc_countries', 'country_id', 'country_id', array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ), array(
        'primary key' => array(
          'country_id',
        ),
      ));
      break;
  }
  return $ret;
}