function permissions_by_term_update_8230 in Permissions by Term 8.2
Add composite primary key via unique table column combinations.
File
- ./
permissions_by_term.install, line 216 - Install, update and uninstall functions for the permissions_by_term module.
Code
function permissions_by_term_update_8230() {
$database = \Drupal::database();
$schema = $database
->schema();
$schema
->dropPrimaryKey('permissions_by_term_role');
$schema
->addPrimaryKey('permissions_by_term_role', [
'tid',
'rid',
'langcode',
]);
$schema
->dropPrimaryKey('permissions_by_term_user');
$schema
->addPrimaryKey('permissions_by_term_user', [
'tid',
'uid',
'langcode',
]);
}