Skip to content

Commit bfad7ba

Browse files
committed
Remove unused file_display and shorten name in file_metadata to avoid too long indexes errors
1 parent fd4729e commit bfad7ba

File tree

1 file changed

+2
-55
lines changed

1 file changed

+2
-55
lines changed

file_entity.install

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4,66 +4,13 @@
44
* @file
55
* Install, update and uninstall functions for the file_entity module.
66
*/
7+
78
use Drupal\views\Entity\View;
89

910
/**
1011
* Implements hook_schema().
1112
*/
1213
function file_entity_schema() {
13-
$schema['file_display'] = array(
14-
'description' => 'Stores configuration options for file displays.',
15-
'fields' => array(
16-
// @todo Can be refactored as a compond primary key after
17-
// http://drupal.org/node/924236 is implemented.
18-
'name' => array(
19-
'description' => 'A combined string (FILE_TYPE__VIEW_MODE__FILE_FORMATTER) identifying a file display configuration. For integration with CTools Exportables, stored as a single string rather than as a compound primary key.',
20-
'type' => 'varchar',
21-
'length' => '255',
22-
'not null' => TRUE,
23-
),
24-
'weight' => array(
25-
'type' => 'int',
26-
'not null' => TRUE,
27-
'default' => 0,
28-
'description' => 'Weight of formatter within the display chain for the associated file type and view mode. A file is rendered using the lowest weighted enabled display configuration that matches the file type and view mode and that is capable of displaying the file.',
29-
),
30-
'status' => array(
31-
'type' => 'int',
32-
'unsigned' => TRUE,
33-
'not null' => TRUE,
34-
'default' => 0,
35-
'size' => 'tiny',
36-
'description' => 'The status of the display. (1 = enabled, 0 = disabled)',
37-
),
38-
'settings' => array(
39-
'type' => 'blob',
40-
'not null' => FALSE,
41-
'size' => 'big',
42-
'serialize' => TRUE,
43-
'description' => 'A serialized array of name value pairs that store the formatter settings for the display.',
44-
),
45-
),
46-
'primary key' => array('name'),
47-
// Exportable support via CTools.
48-
'export' => array(
49-
'key' => 'name',
50-
'key name' => 'Name',
51-
'primary key' => 'name',
52-
// The {file_display}.status field is used to control whether the display
53-
// is active in the display chain. CTools-level disabling is something
54-
// different, and it's not yet clear how to interpret it for file
55-
// displays. Until that's figured out, prevent CTools-level disabling.
56-
'can disable' => FALSE,
57-
'default hook' => 'file_default_displays',
58-
'identifier' => 'file_display',
59-
'api' => array(
60-
'owner' => 'file_entity',
61-
'api' => 'file_default_displays',
62-
'minimum_version' => 1,
63-
'current_version' => 1,
64-
),
65-
),
66-
);
6714
$schema['file_metadata'] = array(
6815
'description' => 'Cache images dimensions.',
6916
'fields' => array(
@@ -77,7 +24,7 @@ function file_entity_schema() {
7724
'name' => array(
7825
'description' => "The name of the metadata (e.g. 'width').",
7926
'type' => 'varchar',
80-
'length' => '255',
27+
'length' => '128',
8128
'not null' => TRUE,
8229
),
8330
'value' => array(

0 commit comments

Comments
 (0)