summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-06-25 12:27:28 +0000
committerDries Buytaert <dries@buytaert.net>2010-06-25 12:27:28 +0000
commit35373aa89cfe5bbed7b19f8782feeea22251d5c6 (patch)
tree357c3a5ed003185ae655065149cc55a0d0c65b13 /modules/system/system.install
parent84003e47bdef397f9ff7d62ee2848edee23aaa15 (diff)
downloadbrdo-35373aa89cfe5bbed7b19f8782feeea22251d5c6.tar.gz
brdo-35373aa89cfe5bbed7b19f8782feeea22251d5c6.tar.bz2
- Patch #831332 by Stevel: drupal_get_schema_unprocessed() called in update functions.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install58
1 files changed, 56 insertions, 2 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index 51b54af70..ec7e14681 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -660,7 +660,6 @@ function system_schema() {
),
'primary key' => array('cid'),
);
-
$schema['cache_bootstrap'] = $schema['cache'];
$schema['cache_bootstrap']['description'] = 'Cache table for data required to bootstrap Drupal, may be routed to a shared memory cache.';
$schema['cache_form'] = $schema['cache'];
@@ -1580,6 +1579,58 @@ function system_schema() {
return $schema;
}
+/**
+ * The cache schema corresponding to system_update_7054.
+ *
+ * Drupal 7 adds several new cache tables. Since they all have identical schema
+ * this helper function allows them to re-use the same definition, without
+ * relying on system_schema(), which may change with future updates.
+ */
+function system_schema_cache_7054() {
+ return array(
+ 'description' => 'Generic cache table for caching things not separated out into their own tables. Contributed modules may also use this to store cached items.',
+ 'fields' => array(
+ 'cid' => array(
+ 'description' => 'Primary Key: Unique cache ID.',
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => '',
+ ),
+ 'data' => array(
+ 'description' => 'A collection of data to cache.',
+ 'type' => 'blob',
+ 'not null' => FALSE,
+ 'size' => 'big',
+ ),
+ 'expire' => array(
+ 'description' => 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'created' => array(
+ 'description' => 'A Unix timestamp indicating when the cache entry was created.',
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'serialized' => array(
+ 'description' => 'A flag to indicate whether content is serialized (1) or not (0).',
+ 'type' => 'int',
+ 'size' => 'small',
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ ),
+ 'indexes' => array(
+ 'expire' => array('expire'),
+ ),
+ 'primary key' => array('cid'),
+ );
+}
+
+
// Updates for core.
function system_update_last_removed() {
@@ -2400,7 +2451,10 @@ function system_update_7053() {
* Remove {cache_*}.headers columns.
*/
function system_update_7054() {
- $cache_tables = array('cache', 'cache_filter', 'cache_form', 'cache_menu', 'cache_page', 'cache_path');
+ // Update: update_fix_d7_requirements() installs this version for cache_path
+ // already, so we don't include it in this particular update. It should be
+ // included in later updates though.
+ $cache_tables = array('cache', 'cache_filter', 'cache_form', 'cache_menu', 'cache_page');
foreach ($cache_tables as $table) {
db_drop_field($table, 'headers');
}