function system_update_7073 in Drupal 7
Add binary to {file_managed}, in case system_update_7034() was run without it.
Related topics
File
- modules/
system/ system.install, line 3195 - Install, update and uninstall functions for the system module.
Code
function system_update_7073() {
db_change_field('file_managed', 'filename', 'filename', array(
'description' => 'Name of the file with no path components. This may differ from the basename of the URI if the file is renamed to avoid overwriting an existing file.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'binary' => TRUE,
));
db_drop_unique_key('file_managed', 'uri');
db_change_field('file_managed', 'uri', 'uri', array(
'description' => 'The URI to access the file (either local or remote).',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'binary' => TRUE,
));
db_add_unique_key('file_managed', 'uri', array(
'uri',
));
}