You are here

function commerce_shipping_update_7004 in Commerce Shipping 7.2

Same name and namespace in other branches
  1. 7 commerce_shipping.install \commerce_shipping_update_7004()

Install the shipping rate cache table for Shipping 2.x if necessary.

File

./commerce_shipping.install, line 129
Contains update hooks for the commerce_shipping module.

Code

function commerce_shipping_update_7004($sandbox) {

  // This should actually never be run on 2.x but is here for reference.

  /*
    if (!db_table_exists('cache_commerce_shipping_rates')) {
      $table = drupal_get_schema_unprocessed('system', 'cache');
      $table['description'] = 'Cache table for the temporary storage of base calculated shipping rates for orders.';
      $table['fields']['cid']['description'] = 'Primary Key: Order ID and shipping method the rates are for.';
      db_create_table('cache_commerce_shipping_rates', $table);
      return t('Created shipping rate cache table for Shipping 2.x.');
    }
    return t('Skipped creating the shipping rate cache table; it already exists.');
  */
}