diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-04 21:58:45 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-04 21:58:45 +0000 |
commit | 4b586bfecae3400ce62cf6ea6bfbd99de23a9dbe (patch) | |
tree | a36c780efee6dad7333fa4ced0799df7fafa7d0c /modules/system/system.install | |
parent | 933bc80411b70b298ddc66d4f742a96a9fcf2fab (diff) | |
download | brdo-4b586bfecae3400ce62cf6ea6bfbd99de23a9dbe.tar.gz brdo-4b586bfecae3400ce62cf6ea6bfbd99de23a9dbe.tar.bz2 |
#895176 follow-up by Berdir: Don't run the upload module upgrade path if there's nothing to upgrade.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r-- | modules/system/system.install | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 97e058e86..ae7ada281 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -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) { |