You are here

function ldapauth_update_2 in LDAP integration 5

Same name and namespace in other branches
  1. 5.2 ldapauth.install \ldapauth_update_2()

File

./ldapauth.install, line 73

Code

function ldapauth_update_2() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {ldapauth} ADD mail_attr VARCHAR(255) NOT NULL default '' AFTER user_attr ");
      $ret[] = update_sql("ALTER TABLE {ldapauth} MODIFY basedn TEXT NOT NULL ");
      break;
    case 'pgsql':
      $ret[] = update_sql("ALTER TABLE {ldapauth} ADD mail_attr VARCHAR(255) NOT NULL default '' AFTER user_attr ");
      $ret[] = update_sql("ALTER TABLE {ldapauth} MODIFY basedn TEXT NOT NULL ");
      break;
  }
  return $ret;
}