You are here

function autoban_update_7002 in Automatic IP ban (Autoban) 7

Add columns: created, changed.

File

./autoban.install, line 101
Installation functions for autoban module.

Code

function autoban_update_7002() {
  if (!db_field_exists('autoban', 'created')) {
    db_add_field('autoban', 'created', array(
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
      'description' => 'Timestamp for when rule was created.',
    ));
  }
  if (!db_field_exists('autoban', 'changed')) {
    db_add_field('autoban', 'changed', array(
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
      'description' => 'Timestamp for when rule was changed.',
    ));
  }
}