function file_entity_schema_alter in D7 Media 7
Implements hook_schema_alter().
1 call to file_entity_schema_alter()
- file_entity_install in file_entity/
file_entity.install - Implements hook_install().
File
- file_entity/
file_entity.install, line 105 - Install, update and uninstall functions for the file_entity module.
Code
function file_entity_schema_alter(&$schema) {
$schema['file_managed']['fields']['type'] = array(
'description' => 'The type of this file.',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
// If the FILE_TYPE_NONE constant ever changes, then change the value here
// too, and add an update function to deal with existing records. The
// constant isn't used here, because there may be cases where this function
// runs without the module file loaded.
'default' => 'undefined',
);
$schema['file_managed']['indexes']['file_type'] = array(
'type',
);
}