You are here

function commerce_cardonfile_update_7101 in Commerce Card on File 7.2

Add the instance_default column to card data table

File

./commerce_cardonfile.install, line 148
Installs the tables required by Commerce Card on File.

Code

function commerce_cardonfile_update_7101(&$sandbox) {
  if (!db_field_exists('commerce_card_data', 'instance_default')) {
    db_add_field('commerce_card_data', 'instance_default', array(
      'description' => 'Boolean indicating the default card for a payment instance ID.',
      'type' => 'int',
      'size' => 'tiny',
      'not null' => TRUE,
      'default' => 0,
    ));
  }
  return t('Card data table has been updated.');
}