Skip to content
Snippets Groups Projects
Commit 6140e65c authored by Alex Pott's avatar Alex Pott
Browse files

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

parent 9b32d95b
No related branches found
No related tags found
No related merge requests found
...@@ -256,7 +256,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ...@@ -256,7 +256,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields['uri'] = FieldDefinition::create('uri') $fields['uri'] = FieldDefinition::create('uri')
->setLabel(t('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') $fields['filemime'] = FieldDefinition::create('string')
->setLabel(t('File MIME type')) ->setLabel(t('File MIME type'))
......
...@@ -46,10 +46,7 @@ public function getSchema() { ...@@ -46,10 +46,7 @@ public function getSchema() {
'file__changed' => array('changed'), 'file__changed' => array('changed'),
); );
$schema['file_managed']['unique keys'] += array( $schema['file_managed']['unique keys'] += array(
// FIXME We have an index size of 255, but the max URI length is 2048 so 'file__uri' => array('uri'),
// this might now always work. Should we replace this with a regular
// index?
'file__uri' => array(array('uri', 255)),
); );
return $schema; return $schema;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment