Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / user / src / UserStorageSchema.php
index 5e590b8958cc6de7a66ed5b4ef1a4d9d5eff9b33..6010687da8b6e874ffe5f25cd1bd6c2d82619e72 100644 (file)
@@ -17,9 +17,11 @@ class UserStorageSchema extends SqlContentEntityStorageSchema {
   protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
     $schema = parent::getEntitySchema($entity_type, $reset);
 
-    $schema['users_field_data']['unique keys'] += [
-      'user__name' => ['name', 'langcode'],
-    ];
+    if ($data_table = $this->storage->getDataTable()) {
+      $schema[$data_table]['unique keys'] += [
+        'user__name' => ['name', 'langcode'],
+      ];
+    }
 
     return $schema;
   }