summaryrefslogtreecommitdiff
path: root/includes/update.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-24 03:20:43 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-24 03:20:43 +0000
commit6c5e31abcbfe199a983ed6161207613d66423412 (patch)
treedcdccfa19a6c5cd4eb7407a917731650a22a6d36 /includes/update.inc
parentf5b9781eeec79efa83dc6fe907b53e044aaad15f (diff)
downloadbrdo-6c5e31abcbfe199a983ed6161207613d66423412.tar.gz
brdo-6c5e31abcbfe199a983ed6161207613d66423412.tar.bz2
#613238 by catch: Fixed missing columns and tables required for upgrade.
Diffstat (limited to 'includes/update.inc')
-rw-r--r--includes/update.inc41
1 files changed, 40 insertions, 1 deletions
diff --git a/includes/update.inc b/includes/update.inc
index a04c4e627..2f26607e4 100644
--- a/includes/update.inc
+++ b/includes/update.inc
@@ -132,8 +132,16 @@ function update_fix_d7_requirements() {
db_add_field('url_alias', 'source', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
db_add_field('url_alias', 'alias', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
- // Add the deliver_callback column to {menu_router}.
+ // Add new columns to {menu_router}.
db_add_field('menu_router', 'delivery_callback', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
+ db_add_field('menu_router', 'context', array(
+ 'description' => 'Only for local tasks (tabs) - the context of a local task to control its placement.',
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ ));
+ db_add_field('menu_router', 'theme_callback', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
+ db_add_field('menu_router', 'theme_arguments', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
// Add the role_permisson table.
$schema['role_permission'] = array(
@@ -157,6 +165,37 @@ function update_fix_d7_requirements() {
);
db_create_table('role_permission', $schema['role_permission']);
+ // Add the {semaphore} table in case menu_rebuild() gets called during
+ // an update.
+ $schema['semaphore'] = array(
+ 'description' => 'Table for holding semaphores, locks, flags, etc. that cannot be stored as Drupal variables since they must not be cached.',
+ 'fields' => array(
+ 'name' => array(
+ 'description' => 'Primary Key: Unique name.',
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => ''
+ ),
+ 'value' => array(
+ 'description' => 'A value for the semaphore.',
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => TRUE,
+ 'default' => ''
+ ),
+ 'expire' => array(
+ 'description' => 'A Unix timestamp with microseconds indicating when the semaphore should expire.',
+ 'type' => 'float',
+ 'size' => 'big',
+ 'not null' => TRUE
+ ),
+ ),
+ 'indexes' => array('value' => array('value')),
+ 'primary key' => array('name'),
+ );
+ db_create_table('semaphore', $schema['semaphore']);
+
// 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.'));