You are here

function quotes_update_6105 in Quotes 6

Implementation of hook_update_N(). Adding author filter to quotes_blocks table.

File

./quotes.install, line 465
Handles installation and updates for the quotes module.

Code

function quotes_update_6105() {
  $ret = array();
  if (db_column_exists('quotes_blocks', 'aid_filter')) {
    $ret[] = array(
      'success' => TRUE,
      'query' => t('The aid_filter column already exists.'),
    );
    db_change_field($ret, 'quotes_blocks', 'aid_filter', 'aid_filter', array(
      'type' => 'text',
      'not null' => TRUE,
    ));
  }
  else {
    db_add_field($ret, 'quotes_blocks', 'aid_filter', array(
      'description' => t('Author filter.'),
      'type' => 'text',
      'not null' => TRUE,
      'initial' => 'none',
    ));
  }
  return $ret;
}