diff --git a/modules/system/system.install b/modules/system/system.install index 0b1e67385c9cdea1f5dd2f014d94886fb046285e..1f204009ba209aadb6ab8c31a85c8faede530f6d 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2631,6 +2631,54 @@ function system_update_7059(&$sandbox) { return; } + // Create the {file_usage} table. + $spec = array( + 'description' => 'Track where a file is used.', + 'fields' => array( + 'fid' => array( + 'description' => 'File ID.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + ), + 'module' => array( + 'description' => 'The name of the module that is using the file.', + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + ), + 'type' => array( + 'description' => 'The name of the object type in which the file is used.', + 'type' => 'varchar', + 'length' => 64, + 'not null' => TRUE, + 'default' => '', + ), + 'id' => array( + 'description' => 'The primary key of the object using the file.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + 'count' => array( + 'description' => 'The number of times this file is used by this object.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + ), + 'primary key' => array('fid', 'type', 'id', 'module'), + 'indexes' => array( + 'type_id' => array('type', 'id'), + 'fid_count' => array('fid', 'count'), + 'fid_module' => array('fid', 'module'), + ), + ); + db_create_table('file_usage', $spec); + if (!isset($sandbox['progress'])) { // Initialize batch update information. $sandbox['progress'] = 0; @@ -2832,58 +2880,6 @@ function system_update_7059(&$sandbox) { } } -/** - * Create the file_usage table. - */ -function system_update_7060() { - $spec = array( - 'description' => 'Track where a file is used.', - 'fields' => array( - 'fid' => array( - 'description' => 'File ID.', - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - ), - 'module' => array( - 'description' => 'The name of the module that is using the file.', - 'type' => 'varchar', - 'length' => 255, - 'not null' => TRUE, - 'default' => '', - ), - 'type' => array( - 'description' => 'The name of the object type in which the file is used.', - 'type' => 'varchar', - 'length' => 64, - 'not null' => TRUE, - 'default' => '', - ), - 'id' => array( - 'description' => 'The primary key of the object using the file.', - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - ), - 'count' => array( - 'description' => 'The number of times this file is used by this object.', - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - ), - ), - 'primary key' => array('fid', 'type', 'id', 'module'), - 'indexes' => array( - 'type_id' => array('type', 'id'), - 'fid_count' => array('fid', 'count'), - 'fid_module' => array('fid', 'module'), - ), - ); - db_create_table('file_usage', $spec); -} - /** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. diff --git a/modules/user/user.install b/modules/user/user.install index a246379eec0b88f0f025bd936af1426a88f13ab2..9bf8f9b5f7f3642e0a999d2a7bc3c258438ae1dd 100644 --- a/modules/user/user.install +++ b/modules/user/user.install @@ -353,7 +353,7 @@ function user_update_dependencies() { ); // user_update_7013 relies on system_update_7060. $dependencies['user'][7013] = array( - 'system' => 7060, + 'system' => 7059, ); return $dependencies;