summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/update.inc55
-rw-r--r--update.php1
2 files changed, 52 insertions, 4 deletions
diff --git a/includes/update.inc b/includes/update.inc
index 64353023b..b7a45d2c5 100644
--- a/includes/update.inc
+++ b/includes/update.inc
@@ -101,6 +101,57 @@ function update_prepare_d7_bootstrap() {
drupal_install_initialize_database();
spl_autoload_unregister('drupal_autoload_class');
spl_autoload_unregister('drupal_autoload_interface');
+
+ // The new cache_bootstrap bin is required to bootstrap to
+ // DRUPAL_BOOTSTRAP_SESSION, so create it here rather than in
+ // update_fix_d7_requirements().
+ $cache_bootstrap = array(
+ 'description' => 'Cache table for data required to bootstrap Drupal, may be routed to a shared memory cache.',
+ '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,
+ ),
+ 'headers' => array(
+ 'description' => 'Any custom HTTP headers to be added to cached data.',
+ 'type' => 'text',
+ 'not null' => FALSE,
+ ),
+ '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'),
+ );
+ db_create_table('cache_bootstrap', $cache_bootstrap);
}
/**
@@ -286,10 +337,6 @@ function update_fix_d7_requirements() {
db_create_table('date_formats', $schema['date_formats']);
db_create_table('date_format_locale', $schema['date_format_locale']);
- $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.';
- db_create_table('cache_bootstrap', $schema['cache_bootstrap']);
-
// Add column for locale context.
if (db_table_exists('locales_source')) {
db_add_field('locales_source', 'context', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', 'description' => 'The context this string applies to.'));
diff --git a/update.php b/update.php
index 9cfef2b7c..2ea827ea0 100644
--- a/update.php
+++ b/update.php
@@ -294,6 +294,7 @@ require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
require_once DRUPAL_ROOT . '/includes/update.inc';
require_once DRUPAL_ROOT . '/includes/common.inc';
require_once DRUPAL_ROOT . '/includes/entity.inc';
+require_once DRUPAL_ROOT . '/includes/unicode.inc';
update_prepare_d7_bootstrap();
// Determine if the current user has access to run update.php.