You are here

function externalauth_update_8101 in External Authentication 8

Same name and namespace in other branches
  1. 2.0.x externalauth.install \externalauth_update_8101()

Change {authmap}.authname type from varchar_ascii to varchar.

File

./externalauth.install, line 71
Install, update and uninstall functions for the externalauth module.

Code

function externalauth_update_8101() {
  $schema = Database::getConnection()
    ->schema();
  if ($schema
    ->tableExists('authmap')) {
    $schema
      ->changeField('authmap', 'authname', 'authname', [
      'description' => 'Unique authentication name provided by authentication provider',
      'type' => 'varchar',
      'length' => 128,
      'not null' => TRUE,
      'default' => '',
    ]);
  }
}