diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-11 19:14:34 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-11 19:14:34 +0000 |
commit | 2ed2c5f9f9a92f07abe705ff562150772613f9c2 (patch) | |
tree | 1371e53e6c57ff94060d8329682292bbfcc817b6 | |
parent | f82029a2d9f7642f2e437bc3d82bc873b2ea945e (diff) | |
download | brdo-2ed2c5f9f9a92f07abe705ff562150772613f9c2.tar.gz brdo-2ed2c5f9f9a92f07abe705ff562150772613f9c2.tar.bz2 |
#173982 by pwolanin and chx: fix schema inconsistencies between a fresh Drupal 6 install and a Drupal 5 upgraded to Drupal 6
-rw-r--r-- | modules/system/system.install | 21 | ||||
-rw-r--r-- | modules/system/system.schema | 8 |
2 files changed, 14 insertions, 15 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 16ba49e5c..3750516b8 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2956,7 +2956,7 @@ function system_update_6009() { */ function system_update_6010() { $ret = array(); - db_add_field($ret, 'watchdog', 'variables', array('type' => 'text', 'size' => 'medium', 'not null' => TRUE, 'initial' => 'N;')); + db_add_field($ret, 'watchdog', 'variables', array('type' => 'text', 'size' => 'big', 'not null' => TRUE, 'initial' => 'N;')); return $ret; } @@ -3508,6 +3508,7 @@ function system_update_6021() { $ret[] = update_sql("UPDATE {blocks_roles} SET delta = '". $menu_name ."' WHERE module = 'menu' AND delta = '". $mid ."'"); } $ret[] = array('success' => TRUE, 'query' => t('Relocated @num existing items to the new menu system.', array('@num' => $_SESSION['system_update_6021']))); + $ret[] = update_sql("DROP TABLE {menu}"); unset($_SESSION['system_update_6021'], $_SESSION['system_update_6021_max'], $_SESSION['menu_menu_map'], $_SESSION['menu_item_map'], $_SESSION['menu_bogus_menus']); // Create the menu overview links - also calls menu_rebuild(). module_invoke('menu', 'enable'); @@ -3569,12 +3570,6 @@ function system_update_6022() { function system_update_6023() { $ret = array(); - // vid is NULL - db_drop_unique_key($ret, 'node', 'nid_vid'); - db_drop_unique_key($ret, 'node', 'vid'); - db_change_field($ret, 'node', 'vid', 'vid', array('type' => 'int', 'unsigned' => TRUE, 'default' => 0)); - db_add_unique_key($ret, 'node', 'nid_vid', array('nid', 'vid')); - db_add_unique_key($ret, 'node', 'vid', array('vid')); // nid is DEFAULT 0 db_drop_index($ret, 'node_revisions', 'nid'); @@ -3759,6 +3754,18 @@ function system_update_6031() { } /** + * profile_fields.name used to be nullable but is part of a unique key + * and so shouldn't be. + */ +function system_update_6032() { + $ret = array(); + db_drop_unique_key($ret, 'profile_fields', 'name'); + db_change_field($ret, 'profile_fields', 'name', 'name', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')); + db_add_unique_key($ret, 'profile_fields', 'name', array('name')); + return $ret; +} + +/** * @} End of "defgroup updates-5.x-to-6.x" * The next series of updates should start at 7000. */ diff --git a/modules/system/system.schema b/modules/system/system.schema index a3ee189b0..d25527a96 100644 --- a/modules/system/system.schema +++ b/modules/system/system.schema @@ -163,14 +163,6 @@ function system_schema() { 'primary key' => array('mlid'), ); - $schema['sequences'] = array( - 'fields' => array( - 'name' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), - 'id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0) - ), - 'primary key' => array('name'), - ); - $schema['sessions'] = array( 'fields' => array( 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE), |