You are here

function restful_token_auth_update_7100 in RESTful 7.2

Same name and namespace in other branches
  1. 7 modules/restful_token_auth/restful_token_auth.install \restful_token_auth_update_7100()

Adds the refresh token entity reference.

File

modules/restful_token_auth/restful_token_auth.install, line 102
Install, update, and uninstall functions for the RESTful token authentication module.

Code

function restful_token_auth_update_7100(&$sandbox) {

  // Change the type column for existing tokens.
  db_update('restful_token_auth')
    ->fields(array(
    'type' => 'access_token',
  ))
    ->execute();

  // Attach the new field.
  restful_token_auth_create_field_refresh_token();
}