Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
6140e65c
Commit
6140e65c
authored
Jun 24, 2014
by
alexpott
Browse files
Issue
#2279363
by tstoeckler: Fixed file_managed.uri should not specify a prefixed unique key.
parent
9b32d95b
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/file/src/Entity/File.php
View file @
6140e65c
...
...
@@ -256,7 +256,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'
))
...
...
core/modules/file/src/FileStorage.php
View file @
6140e65c
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment