You are here

function ldap_authorization_update_7107 in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_authorization/ldap_authorization.install \ldap_authorization_update_7107()
  2. 7 ldap_authorization/ldap_authorization.install \ldap_authorization_update_7107()

add derive_from_entry_use_first_attr field to and remove description field from ldap_authorization table

File

ldap_authorization/ldap_authorization.install, line 259
Install, update and uninstall functions for the LDAP authorization module.

Code

function ldap_authorization_update_7107() {
  $changes = '';
  if (!db_field_exists('ldap_authorization', 'derive_from_entry_use_first_attr')) {
    db_add_field('ldap_authorization', 'derive_from_entry_use_first_attr', array(
      'type' => 'int',
      'size' => 'tiny',
      'not null' => TRUE,
      'default' => 0,
    ));
    $changes .= t('"derive_from_entry_use_first_attr" field added to ldap_authorization table');
  }
  if (db_field_exists('ldap_authorization', 'description')) {
    db_drop_field('ldap_authorization', 'description');
    $changes .= t('"description" field dropped from to ldap_authorization table');
  }
  return $changes ? $changes : t('No database changes made.');
}