Commit 6140e65c authored by alexpott's avatar alexpott
Browse files

Issue #2279363 by tstoeckler: Fixed file_managed.uri should not specify a prefixed unique key.

parent 9b32d95b
......@@ -256,7 +256,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields['uri'] = FieldDefinition::create('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'))
......@@ -46,10 +46,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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment