You are here

function gauth_update_7003 in Google Auth 7

Same name and namespace in other branches
  1. 7.2 gauth.install \gauth_update_7003()

Add the gauth_accounts.access_type field.

File

./gauth.install, line 151
Install and uninstall functions for the Google OAuth module.

Code

function gauth_update_7003() {
  $field = array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
    'default' => 'offline',
    'description' => 'Stores the access type of the account.',
  );
  db_add_field('gauth_accounts', 'access_type', $field);
  db_update('gauth_accounts')
    ->fields(array(
    'access_type' => 'offline',
  ))
    ->execute();
}