You are here

function uc_attribute_update_6 in Ubercart 5

File

uc_attribute/uc_attribute.install, line 265

Code

function uc_attribute_update_6() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {uc_product_attributes} ADD COLUMN required tinyint(2) NOT NULL default 0 AFTER default_option");
      break;
    case 'pgsql':
      db_add_column($ret, 'uc_product_attributes', 'required', 'smallint', array(
        'not null' => true,
        'default' => 0,
      ));
      break;
  }
  return $ret;
}