You are here

function _oauth_common_update_6002 in OAuth 1.0 6.3

This update adds a expiry time column to the tokens table.

1 call to _oauth_common_update_6002()
oauth_common_update_6002 in ./oauth_common.install
Implementation of hook_update_N().

File

updates/update.6002.inc, line 6

Code

function _oauth_common_update_6002() {
  $ret = array();
  db_add_field($ret, 'oauth_common_token', 'expires', array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
    'description' => 'The expiry time for the token, as a Unix timestamp.',
  ));
  db_add_index($ret, 'oauth_common_token', 'expires', array(
    'expires',
  ));
  $ret[] = update_sql("UPDATE {oauth_common_token} SET expires=created+7200 WHERE type='request'");
  return $ret;
}