diff --git a/core/modules/file/src/Entity/File.php b/core/modules/file/src/Entity/File.php
index 8564127..8635d88 100644
--- a/core/modules/file/src/Entity/File.php
+++ b/core/modules/file/src/Entity/File.php
@@ -249,7 +249,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
 
     $fields['uri'] = FieldDefinition::create('uri')
       ->setLabel(t('URI'))
-      ->setDescription(t('The URI to access the file (either local or remote).'));
+      ->setDescription(t('The URI to access the file (either local or remote).'))
+      ->setSetting('max_length', 255);
 
     $fields['filemime'] = FieldDefinition::create('string')
       ->setLabel(t('File MIME type'))
diff --git a/core/modules/file/src/FileStorage.php b/core/modules/file/src/FileStorage.php
index 4b30ad6..03d8464 100644
--- a/core/modules/file/src/FileStorage.php
+++ b/core/modules/file/src/FileStorage.php
@@ -58,10 +58,7 @@ public function getSchema() {
       'file__changed' => array('changed'),
     );
     $schema['file_managed']['unique keys'] += array(
-      // FIXME We have an index size of 255, but the max URI length is 2048 so
-      // this might now always work. Should we replace this with a regular
-      // index?
-      'file__uri' => array(array('uri', 255)),
+      'file__uri' => array('uri'),
     );
 
     return $schema;
