You are here

function commerce_payment_update_7104 in Commerce Core 7

Add an index on the remote_id field for payment transaction revisions.

File

modules/payment/commerce_payment.install, line 318
Installation functions for Drupal Commerce Payment.

Code

function commerce_payment_update_7104() {
  if (!db_index_exists('commerce_payment_transaction', 'remote_id')) {
    db_add_index('commerce_payment_transaction', 'remote_id', array(
      'remote_id',
    ));
  }
  if (!db_index_exists('commerce_payment_transaction_revision', 'remote_id')) {
    db_add_index('commerce_payment_transaction_revision', 'remote_id', array(
      'remote_id',
    ));
  }
  return t('Schema for the commerce_payment_transaction and commerce_payment_transaction_revision tables have been updated.');
}