diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7b2f50ae353135ad27abbeca17ecd68d0719d69a..f37df92da436fcd019b1bb9dc81c2d576ed4a6b6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ CCK 6.2-dev =========== +- #318387 Make sure old fieldgroup updates don't run if tables were never created. - #318227 Clean up update abort logic to more clearly explain what still needs to be done, add a helper function to prevent dangerous database operations until database is updated. - #317232 Change css file name from content.css to content-module.css to avoid namespace collisions. - #316656 Default weight must be zero, not NULL, or form ordering will be incorrect. diff --git a/modules/fieldgroup/fieldgroup.install b/modules/fieldgroup/fieldgroup.install index 281ce6fd076d85c4054f99f1df300755e9bf74cf..2e1bb5005ae63ac0cb5f858b52773fbfef57db3c 100644 --- a/modules/fieldgroup/fieldgroup.install +++ b/modules/fieldgroup/fieldgroup.install @@ -76,6 +76,9 @@ function fieldgroup_schema() { */ function fieldgroup_update_1() { $ret = array(); + if (!db_table_exists('node_group')) { + return $ret; + } switch ($GLOBALS['db_type']) { case 'pgsql': $ret[] = update_sql("UPDATE {node_group} SET group_name = 'group_'||SUBSTRING(group_name FROM 7)"); @@ -96,6 +99,9 @@ function fieldgroup_update_1() { */ function fieldgroup_update_2() { $ret = array(); + if (!db_table_exists('node_group')) { + return $ret; + } // set settings column to accept larger values switch ($GLOBALS['db_type']) { @@ -140,6 +146,9 @@ function fieldgroup_update_2() { */ function fieldgroup_update_3() { $ret = array(); + if (!db_table_exists('node_group')) { + return $ret; + } $result = db_query("SELECT * FROM {node_group}"); while ($group = db_fetch_array($result)) { $group['settings'] = unserialize($group['settings']);