You are here

function uc_order_update_6014 in Ubercart 6.2

Change currency fields to numeric(16,5).

File

uc_order/uc_order.install, line 982
Install, update and uninstall functions for the uc_order module.

Code

function uc_order_update_6014() {
  $ret = array();
  db_change_field($ret, 'uc_orders', 'order_total', 'order_total', array(
    'type' => 'numeric',
    'precision' => 16,
    'scale' => 5,
    'not null' => TRUE,
    'default' => 0.0,
  ));
  db_change_field($ret, 'uc_order_line_items', 'amount', 'amount', array(
    'type' => 'numeric',
    'precision' => 16,
    'scale' => 5,
    'not null' => TRUE,
    'default' => 0.0,
  ));
  db_change_field($ret, 'uc_order_products', 'cost', 'cost', array(
    'type' => 'numeric',
    'precision' => 16,
    'scale' => 5,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_change_field($ret, 'uc_order_products', 'price', 'price', array(
    'type' => 'numeric',
    'precision' => 16,
    'scale' => 5,
    'not null' => TRUE,
    'default' => 0,
  ));
  return $ret;
}