You are here

feeds_oauth.install in Feeds OAuth 6

Same filename and directory in other branches
  1. 7 feeds_oauth.install

File

feeds_oauth.install
View source
<?php

/**
 * Implementation of hook_schema().
 */
function feeds_oauth_schema() {
  $schema = array();
  $schema['feeds_oauth_access_tokens'] = array(
    'description' => t('OAuth access tokens per user per site.'),
    'fields' => array(
      'uid' => array(
        'description' => t('User identifier for this token.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'oauth_token' => array(
        'description' => t('OAuth access token.'),
        'type' => 'varchar',
        'length' => '100',
        'not null' => TRUE,
      ),
      'oauth_token_secret' => array(
        'description' => t('OAuth access token secret.'),
        'type' => 'varchar',
        'length' => '100',
        'not null' => TRUE,
      ),
      'site_id' => array(
        'description' => t('Site identifier for this token.'),
        'type' => 'varchar',
        'length' => '50',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'uid',
      'site_id',
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_install().
 */
function feeds_oauth_install() {

  // Create tables.
  drupal_install_schema('feeds_oauth');
}

/**
 * Implementation of hook_uninstall().
 */
function feeds_oauth_uninstall() {

  // Remove tables.
  drupal_uninstall_schema('feeds_oauth');
}

Functions

Namesort descending Description
feeds_oauth_install Implementation of hook_install().
feeds_oauth_schema Implementation of hook_schema().
feeds_oauth_uninstall Implementation of hook_uninstall().