Commit 8e22c485 authored by webchick's avatar webchick

#653956 by moshe weitzman and catch: Create {cache_bootstrap()} in...

#653956 by moshe weitzman and catch: Create {cache_bootstrap()} in update_prepare_d7_bootstrap() to fix yet another problem in the update path.
parent cc42c55f
......@@ -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.'));
......
......@@ -294,6 +294,7 @@ function update_check_requirements() {
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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment