$db_type)), 'error'); } foreach ($query as $q) { $status = db_query ($q); if (!$status) { drupal_set_message(t('Error installing fb_user: %error %query', array('%query' => '
'.$q.'
', '%error' => db_error())), 'error'); } } } function fb_user_update_1() { fb_user_install(); // Changed name of table to fb_user_app $ret[] = update_sql("DROP TABLE IF EXISTS {fb_app_user}"); return $ret; } function fb_user_update_2() { $ret = array(); // Add local uid to fb_user_app table. $ret[] = update_sql("ALTER TABLE {fb_user_app} ADD COLUMN uid int(11) DEFAULT NULL"); $ret[] = update_sql("ALTER TABLE {fb_user_app} ADD INDEX (uid)"); $ret[] = update_sql("ALTER TABLE {fb_user_app} ADD UNIQUE INDEX (uid, apikey)"); return $ret; } function fb_user_update_3() { // populate the uid column we created in update 2 $ret[] = update_sql("UPDATE {fb_user_app},{authmap} SET {fb_user_app}.uid={authmap}.uid WHERE substring_index(authname, '@', 1)=fbu"); return $ret; } ?>