function ldap_servers_update_7104 in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_servers/ldap_servers.install \ldap_servers_update_7104()
- 7 ldap_servers/ldap_servers.install \ldap_servers_update_7104()
Add pagination fields to ldap_servers table.
File
- ldap_servers/
ldap_servers.install, line 251 - Install, update and uninstall functions for the LDAP API module.
Code
function ldap_servers_update_7104() {
if (!ldap_servers_db_field_exists('ldap_servers', 'search_pagination')) {
db_add_field('ldap_servers', 'search_pagination', [
'type' => 'int',
'size' => 'tiny',
'not null' => FALSE,
'default' => 0,
]);
$msg = t('"search_pagination" field added to ldap_servers table');
}
if (!ldap_servers_db_field_exists('ldap_servers', 'search_page_size')) {
db_add_field('ldap_servers', 'search_page_size', [
'type' => 'int',
'size' => 'medium',
'not null' => FALSE,
'default' => 1000,
]);
$msg .= '<br/>' . t('"search_page_size" field added to ldap_servers table');
}
if (!ldap_servers_db_field_exists('ldap_servers', 'unique_persistent_attr_binary')) {
db_add_field('ldap_servers', 'unique_persistent_attr_binary', [
'type' => 'int',
'size' => 'tiny',
'not null' => FALSE,
'default' => 0,
]);
$msg = t('"unique_persistent_attr_binary" field added to ldap_servers table');
}
return $msg ? $msg : t('No database changes made.');
}