You are here

function commerce_order_update_7111 in Commerce Core 7

Add additional indexes to {commerce_order} around status.

File

modules/order/commerce_order.install, line 514

Code

function commerce_order_update_7111() {
  if (!db_index_exists('commerce_order', 'status')) {
    db_add_index('commerce_order', 'status', array(
      'status',
    ));
  }
  if (!db_index_exists('commerce_order', 'order_id_uid_status')) {
    db_add_index('commerce_order', 'order_id_uid_status', array(
      'order_id',
      'uid',
      'status',
    ));
  }
  return t('Database indexes added to commerce_order for status.');
}