You are here

function file_entity_schema_alter in File Entity (fieldable files) 7.2

Same name and namespace in other branches
  1. 7.3 file_entity.install \file_entity_schema_alter()
  2. 7 file_entity.install \file_entity_schema_alter()

Implements hook_schema_alter().

1 call to file_entity_schema_alter()
file_entity_install in ./file_entity.install
Implements hook_install().

File

./file_entity.install, line 155
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',
  );
}