You are here

function file_entity_update_7214 in File Entity (fieldable files) 7.2

Same name and namespace in other branches
  1. 7.3 file_entity.install \file_entity_update_7214()

Fix the default value in {file_managed}.type to match the field schema.

File

./file_entity.install, line 1058
Install, update and uninstall functions for the file_entity module.

Code

function file_entity_update_7214() {
  db_drop_index('file_managed', 'file_type');
  db_change_field('file_managed', 'type', 'type', array(
    'description' => 'The type of this file.',
    'type' => 'varchar',
    'length' => 50,
    'not null' => TRUE,
    'default' => 'undefined',
  ));
  db_add_index('file_managed', 'file_type', array(
    'type',
  ));
}