You are here

function uc_attribute_update_6005 in Ubercart 6.2

Change currency fields to numeric(16,5).

File

uc_attribute/uc_attribute.install, line 526
Install hooks for uc_attribute.module.

Code

function uc_attribute_update_6005() {
  $ret = array();
  db_change_field($ret, 'uc_attribute_options', 'cost', 'cost', array(
    'type' => 'numeric',
    'precision' => 16,
    'scale' => 5,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_change_field($ret, 'uc_attribute_options', 'price', 'price', array(
    'type' => 'numeric',
    'precision' => 16,
    'scale' => 5,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_change_field($ret, 'uc_class_attribute_options', 'cost', 'cost', array(
    'type' => 'numeric',
    'precision' => 16,
    'scale' => 5,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_change_field($ret, 'uc_class_attribute_options', 'price', 'price', array(
    'type' => 'numeric',
    'precision' => 16,
    'scale' => 5,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_change_field($ret, 'uc_product_options', 'cost', 'cost', array(
    'type' => 'numeric',
    'precision' => 16,
    'scale' => 5,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_change_field($ret, 'uc_product_options', 'price', 'price', array(
    'type' => 'numeric',
    'precision' => 16,
    'scale' => 5,
    'not null' => TRUE,
    'default' => 0,
  ));
  return $ret;
}