comparison core/modules/user/src/UserStorageSchema.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
15 * {@inheritdoc} 15 * {@inheritdoc}
16 */ 16 */
17 protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) { 17 protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
18 $schema = parent::getEntitySchema($entity_type, $reset); 18 $schema = parent::getEntitySchema($entity_type, $reset);
19 19
20 $schema['users_field_data']['unique keys'] += [ 20 if ($data_table = $this->storage->getDataTable()) {
21 'user__name' => ['name', 'langcode'], 21 $schema[$data_table]['unique keys'] += [
22 ]; 22 'user__name' => ['name', 'langcode'],
23 ];
24 }
23 25
24 return $schema; 26 return $schema;
25 } 27 }
26 28
27 /** 29 /**