Skip to content
Snippets Groups Projects
Commit 4b586bfe authored by Angie Byron's avatar Angie Byron
Browse files

#895176 follow-up by Berdir: Don't run the upload module upgrade path if...

#895176 follow-up by Berdir: Don't run the upload module upgrade path if there's nothing to upgrade.
parent 933bc804
No related branches found
No related tags found
No related merge requests found
......@@ -2593,6 +2593,16 @@ function system_update_7060() {
return;
}
if (!db_query_range('SELECT 1 FROM {upload}', 0, 1)->fetchField()) {
// There is nothing to migrate. Delete variables and the empty table. There
// is no need to create fields that are not going to be used.
foreach (_update_7000_node_get_types() as $node_type) {
variable_del('upload_' . $node_type->type);
}
db_drop_table('upload');
return;
}
// Check which node types have upload.module attachments enabled.
$context['types'] = array();
foreach (_update_7000_node_get_types() as $node_type) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment