You are here

function uc_attribute_update_7 in Ubercart 5

File

uc_attribute/uc_attribute.install, line 279

Code

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