summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-07-11 15:15:40 +0000
committerDries Buytaert <dries@buytaert.net>2007-07-11 15:15:40 +0000
commit6ec2ff7e1563f7da82f9411878e2c7482b671983 (patch)
tree484b05be33ba384db140fa8f3f3c7386fa2c63f9 /modules/system
parent70f9297c100eaa1736b8e136a2e32c9d87b56de4 (diff)
downloadbrdo-6ec2ff7e1563f7da82f9411878e2c7482b671983.tar.gz
brdo-6ec2ff7e1563f7da82f9411878e2c7482b671983.tar.bz2
- Patch #94154 by dww, Earl et al: update notifications for Drupal!
Woot, woot! :)
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.install35
1 files changed, 35 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index e09916ecf..2d5489dd1 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -3439,6 +3439,41 @@ function system_update_6025() {
return $ret;
}
+/**
+ * Enable the update.module by default on sites that upgrade.
+ *
+ * This cannot just rely on update.install to install the schema. If,
+ * in the future, someone decides to change the schema for the
+ * {cache_update} table, this update would cause uncertainty in the
+ * state of the DB, since the effect of running this update would
+ * change. For example, if the schema is changed in update #6101, and
+ * a site upgrades direct from 5.x to 6.1, update #6026 would create
+ * the table with the new schema, and then update #6101 would fail,
+ * since it's trying to alter the old schema into the new
+ * schema. Therefore, we must hard-code the particular version of the
+ * schema we mean during update #6026, and then future upgrades that
+ * might attempt to modify the schema of this table will be starting
+ * from a known state. See http://drupal.org/node/150220 for more.
+ */
+function system_update_6026() {
+ $ret = array();
+ $schema['cache_update'] = array(
+ 'fields' => array(
+ 'cid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+ 'data' => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'),
+ 'expire' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+ 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+ 'headers' => array('type' => 'text', 'not null' => FALSE),
+ 'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0)
+ ),
+ 'indexes' => array('expire' => array('expire')),
+ 'primary key' => array('cid'),
+ );
+ db_create_table($ret, 'cache_update', $schema['cache_update']);
+ module_enable(array('update'));
+ menu_rebuild();
+ return $ret;
+}
/**
* @} End of "defgroup updates-5.x-to-6.x"