summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-08-06 16:29:31 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-08-06 16:29:31 -0700
commit1e48014398e19d334bb0b6e5ac517265b575a6f4 (patch)
tree11b0e38f2cf212ca48bfb8946c3f446abe354061 /modules
parent3af0b234d2d9d0be8bf578096d621a57eaf3481a (diff)
downloadbrdo-1e48014398e19d334bb0b6e5ac517265b575a6f4.tar.gz
brdo-1e48014398e19d334bb0b6e5ac517265b575a6f4.tar.bz2
Issue #717834 by David_Rothstein, clemens.tolboom, catch: Fixed The dependencies declared in core's hook_update_dependencies() implementations aren't actually correct.
Diffstat (limited to 'modules')
-rw-r--r--modules/block/block.install10
-rw-r--r--modules/comment/comment.install12
-rw-r--r--modules/field/modules/text/text.install13
-rw-r--r--modules/filter/filter.install5
-rw-r--r--modules/node/node.install20
-rw-r--r--modules/system/system.install13
-rw-r--r--modules/taxonomy/taxonomy.install25
-rw-r--r--modules/user/user.install35
8 files changed, 61 insertions, 72 deletions
diff --git a/modules/block/block.install b/modules/block/block.install
index c45b076bf..b2ab477d9 100644
--- a/modules/block/block.install
+++ b/modules/block/block.install
@@ -190,16 +190,12 @@ function block_install() {
* Implements hook_update_dependencies().
*/
function block_update_dependencies() {
- // Block update 7005 needs to query the list of existing text formats and
- // therefore must run after filter_update_7000().
+ // block_update_7005() needs to query the {filter_format} table to get a list
+ // of existing text formats, so it must run after filter_update_7000(), which
+ // creates that table.
$dependencies['block'][7005] = array(
'filter' => 7000,
);
- // Ensure that format columns are only changed after Filter module has changed
- // the primary records.
- $dependencies['block'][7007] = array(
- 'filter' => 7010,
- );
return $dependencies;
}
diff --git a/modules/comment/comment.install b/modules/comment/comment.install
index 120467fd0..cda3c308d 100644
--- a/modules/comment/comment.install
+++ b/modules/comment/comment.install
@@ -83,14 +83,16 @@ function comment_modules_enabled($modules) {
* Implements hook_update_dependencies().
*/
function comment_update_dependencies() {
- // Comment update 7005 creates the comment body field and therefore must run
- // after text module has been enabled and entities have been updated.
+ // comment_update_7005() creates the comment body field and therefore must
+ // run after all Field modules have been enabled, which happens in
+ // system_update_7027().
$dependencies['comment'][7005] = array(
- 'system' => 7021,
+ 'system' => 7027,
);
- // Comment update 7006 needs to query the list of existing text formats and
- // therefore must run after filter_update_7000().
+ // comment_update_7006() needs to query the {filter_format} table to get a
+ // list of existing text formats, so it must run after filter_update_7000(),
+ // which creates that table.
$dependencies['comment'][7006] = array(
'filter' => 7000,
);
diff --git a/modules/field/modules/text/text.install b/modules/field/modules/text/text.install
index b9bd25f19..61be748ac 100644
--- a/modules/field/modules/text/text.install
+++ b/modules/field/modules/text/text.install
@@ -67,19 +67,6 @@ function text_field_schema($field) {
}
/**
- * Implements hook_update_dependencies().
- */
-function text_update_dependencies() {
- // Ensure that format columns are only changed after Filter module has changed
- // the primary records.
- $dependencies['text'][7000] = array(
- 'filter' => 7010,
- );
-
- return $dependencies;
-}
-
-/**
* Change text field 'format' columns into varchar.
*/
function text_update_7000() {
diff --git a/modules/filter/filter.install b/modules/filter/filter.install
index 84512cd58..19fd8aa18 100644
--- a/modules/filter/filter.install
+++ b/modules/filter/filter.install
@@ -152,8 +152,9 @@ function filter_install() {
* Implements hook_update_dependencies().
*/
function filter_update_dependencies() {
- // Filter update 7007 migrates permissions and therefore needs to run after
- // the {role} table is properly set up.
+ // filter_update_7005() migrates role permissions and therefore must run
+ // after the {role} and {role_permission} tables are properly set up, which
+ // happens in user_update_7007().
$dependencies['filter'][7005] = array(
'user' => 7007,
);
diff --git a/modules/node/node.install b/modules/node/node.install
index 2498091fc..d33f095f0 100644
--- a/modules/node/node.install
+++ b/modules/node/node.install
@@ -447,17 +447,23 @@ function node_install() {
* Implements hook_update_dependencies().
*/
function node_update_dependencies() {
- // Node update 7006 migrates node data to fields and therefore must run after
- // the Field module has been enabled, but before upgrading field data.
+ // node_update_7006() migrates node data to fields and therefore must run
+ // after all Field modules have been enabled, which happens in
+ // system_update_7027(). It also needs to query the {filter_format} table to
+ // get a list of existing text formats, so it must run after
+ // filter_update_7000(), which creates that table.
$dependencies['node'][7006] = array(
- 'system' => 7049,
- // It must also run after filter_update_7000() because it needs to query
- // the list of existing text formats.
+ 'system' => 7027,
'filter' => 7000,
);
- $dependencies['system'][7050] = array(
- 'node' => 7006,
+
+ // node_update_7008() migrates role permissions and therefore must run after
+ // the {role} and {role_permission} tables are properly set up, which happens
+ // in user_update_7007().
+ $dependencies['node'][7008] = array(
+ 'user' => 7007,
);
+
return $dependencies;
}
diff --git a/modules/system/system.install b/modules/system/system.install
index e55c7cf3a..6cbbb9ed0 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -1681,11 +1681,19 @@ function system_update_last_removed() {
* Implements hook_update_dependencies().
*/
function system_update_dependencies() {
- // Update 7053 adds new blocks, so make sure the block tables are updated.
+ // system_update_7053() queries the {block} table, so it must run after
+ // block_update_7002(), which creates that table.
$dependencies['system'][7053] = array(
'block' => 7002,
);
+ // system_update_7067() migrates role permissions and therefore must run
+ // after the {role} and {role_permission} tables are properly set up, which
+ // happens in user_update_7007().
+ $dependencies['system'][7067] = array(
+ 'user' => 7007,
+ );
+
return $dependencies;
}
@@ -1866,9 +1874,6 @@ function system_update_7005() {
/**
* Convert to new method of storing permissions.
- *
- * This update is in system.install rather than user.install so that
- * all modules can use the updated permission scheme during their updates.
*/
function system_update_7007() {
// Copy the permissions from the old {permission} table to the new {role_permission} table.
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install
index 68fbc7804..f442c95ef 100644
--- a/modules/taxonomy/taxonomy.install
+++ b/modules/taxonomy/taxonomy.install
@@ -251,26 +251,11 @@ function taxonomy_field_schema($field) {
* Implements hook_update_dependencies().
*/
function taxonomy_update_dependencies() {
- // Taxonomy update 7002 creates comment Field API bundles and therefore must
- // run after the Field module has been enabled, but before upgrading field
- // data.
- $dependencies['taxonomy'][7002] = array(
- 'system' => 7049,
- );
- $dependencies['user'][7006] = array(
- 'taxonomy' => 7002,
- );
- $dependencies['system'][7050] = array(
- 'taxonomy' => 7002,
- );
- // It also must run before nodes are upgraded to use the Field API.
- $dependencies['node'][7006] = array(
- 'taxonomy' => 7002,
- );
- // Ensure that format columns are only changed after Filter module has changed
- // the primary records.
- $dependencies['taxonomy'][7009] = array(
- 'filter' => 7010,
+ // taxonomy_update_7004() migrates taxonomy term data to fields and therefore
+ // must run after all Field modules have been enabled, which happens in
+ // system_update_7027().
+ $dependencies['taxonomy'][7004] = array(
+ 'system' => 7027,
);
return $dependencies;
diff --git a/modules/user/user.install b/modules/user/user.install
index 75fca6590..2867b97ed 100644
--- a/modules/user/user.install
+++ b/modules/user/user.install
@@ -340,25 +340,32 @@ function user_install() {
* Implements hook_update_dependencies().
*/
function user_update_dependencies() {
- // Run all the critical user upgrades before everything.
- $dependencies['system'][7000] = array(
- 'user' => 7008,
- );
- // Both user_update_7006() and user_update_7010() need to query the list of
- // existing text formats and therefore must run after filter_update_7003().
- // @todo: move user_update_7006 down below in the upgrade process.
+ // user_update_7006() updates data in the {role_permission} table, so it must
+ // run after system_update_7007(), which populates that table.
$dependencies['user'][7006] = array(
- 'filter' => 7003,
+ 'system' => 7007,
+ );
+
+ // user_update_7010() needs to query the {filter_format} table to get a list
+ // of existing text formats, so it must run after filter_update_7000(), which
+ // creates that table.
+ $dependencies['user'][7010] = array(
+ 'filter' => 7000,
);
- // user_update_7013 relies on system_update_7060.
+
+ // user_update_7012() uses the file API, which relies on the {file_managed}
+ // table, so it must run after system_update_7034(), which creates that
+ // table.
+ $dependencies['user'][7012] = array(
+ 'system' => 7034,
+ );
+
+ // user_update_7013() uses the file usage API, which relies on the
+ // {file_usage} table, so it must run after system_update_7059(), which
+ // creates that table.
$dependencies['user'][7013] = array(
'system' => 7059,
);
- // Ensure that format columns are only changed after Filter module has changed
- // the primary records.
- $dependencies['user'][7015] = array(
- 'filter' => 7010,
- );
return $dependencies;
}