You are here

function login_security_update_6000 in Login Security 6

Support IPv6 length addresses in 6.x because the original 6.x didn't have this update function. Since it's redundant from the previous update function, it's mostly just helping support PostgreSQL. Because update_5000() was the same, without schema, it was removed.

Return value

array

File

./login_security.install, line 94
Login Security installation routines

Code

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

  // Change current primary key
  db_add_index($ret, 'login_security_track', 'id', array(
    'id',
  ));
  db_drop_primary_key($ret, 'login_security_track');
  db_add_primary_key($ret, 'login_security_track', array(
    'id',
  ));
  db_change_field($ret, 'login_security_track', 'host', 'host', array(
    'type' => 'varchar',
    'length' => 39,
    'not null' => TRUE,
    'default' => '',
    'description' => t("The IP address of the request."),
  ));
  db_add_index($ret, 'login_security_track', 'host', array(
    'host',
  ));
  db_add_index($ret, 'login_security_track', 'name', array(
    'name',
  ));
  db_drop_index($ret, 'login_security_track', 'timestamp');
  return $ret;
}