You are here

function _oauth_common_update_6001 in OAuth 1.0 6.3

This update either creates a authorization levels table, or transfers the authorization levels table from the services_oauth module.

1 call to _oauth_common_update_6001()
oauth_common_update_6001 in ./oauth_common.install
Implementation of hook_update_N().

File

updates/update.6001.inc, line 7

Code

function _oauth_common_update_6001() {
  $ret = array();
  if (db_table_exists('services_oauth_authorization_levels')) {
    $ret[] = update_sql("ALTER TABLE {services_oauth_authorization_levels} RENAME TO {oauth_authorization_levels}");
  }
  else {
    db_create_table($ret, 'oauth_authorization_levels', _oauth_common_oauth_authorization_levels_6001());
  }
  return $ret;
}