From 922bf65fef34cfe4675240b613329e962f3f8d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Fri, 14 Sep 2007 09:43:13 +0000 Subject: #173982 follow up patch by webernet: the profile table might not exist, so we need to check for its existance before updating it --- modules/system/system.install | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/system/system.install b/modules/system/system.install index 3750516b8..c6fa00d51 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3759,9 +3759,11 @@ function system_update_6031() { */ 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')); + if (db_table_exists('profile_fields')) { + 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; } -- cgit v1.2.3