You are here

function permissions_by_term_update_8145 in Permissions by Term 8.2

Same name and namespace in other branches
  1. 8 permissions_by_term.install \permissions_by_term_update_8145()

Add field for langcode in user and role permission tables.

File

./permissions_by_term.install, line 144
Install, update and uninstall functions for the permissions_by_term module.

Code

function permissions_by_term_update_8145() {
  $database = \Drupal::database();
  $schema = $database
    ->schema();
  $spec = [
    'type' => 'varchar_ascii',
    'length' => 12,
    'not null' => TRUE,
    'default' => '',
  ];
  $schema
    ->addField('permissions_by_term_role', 'langcode', $spec);
  $schema
    ->addField('permissions_by_term_user', 'langcode', $spec);
}