You are here

function ldap_servers_update_7100 in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_servers/ldap_servers.install \ldap_servers_update_7100()
  2. 7 ldap_servers/ldap_servers.install \ldap_servers_update_7100()

Rename ldap_servers type field to ldap_type.

File

ldap_servers/ldap_servers.install, line 150
Install, update and uninstall functions for the LDAP API module.

Code

function ldap_servers_update_7100() {
  if (!ldap_servers_db_field_exists('ldap_servers', 'ldap_type') && ldap_servers_db_field_exists('ldap_servers', 'type')) {
    db_change_field('ldap_servers', 'type', 'ldap_type', [
      'type' => 'varchar',
      'length' => 20,
      'not null' => FALSE,
    ]);
  }
  return t('ldap_servers table field "type" renamed to "ldap_type"');
}