You are here

function invoice_update_3 in Invoice 6

Implementation of hook_update_N()

Return value

array Array with query results

File

./invoice.install, line 187

Code

function invoice_update_3() {
  $ret = array();

  // Array to which query results will be added.
  if (is_null(variable_get('invoice_invoice_number_zerofill', NULL))) {
    variable_set('invoice_invoice_number_zerofill', 4);
  }
  if (is_null(variable_get('invoice_invoice_number_prefix', NULL))) {
    variable_set('invoice_invoice_number_prefix', '%Y');
  }
  db_add_field($ret, 'invoice_invoices', 'leading_zeros', array(
    'type' => 'int',
    'size' => 'tiny',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_add_field($ret, 'invoice_invoices', 'prefix', array(
    'type' => 'varchar',
    'length' => 50,
    'not null' => FALSE,
  ));
  return $ret;

  // Array with query results.
}