function file_entity_update_7000 in File Entity (fieldable files) 7.3
Same name and namespace in other branches
- 7 file_entity.install \file_entity_update_7000()
- 7.2 file_entity.install \file_entity_update_7000()
Create the {file_display} database table.
File
- ./
file_entity.install, line 260 - Install, update and uninstall functions for the file_entity module.
Code
function file_entity_update_7000() {
if (db_table_exists('file_display')) {
return t('The table {file_display} already exists.');
}
$schema['file_display'] = array(
'description' => 'Stores configuration options for file displays.',
'fields' => array(
'name' => array(
'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.',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'weight' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'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.',
),
'status' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => 'The status of the display. (1 = enabled, 0 = disabled)',
),
'settings' => array(
'type' => 'blob',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
'description' => 'A serialized array of name value pairs that store the formatter settings for the display.',
),
),
'primary key' => array(
'name',
),
);
db_create_table('file_display', $schema['file_display']);
}