iyo-8.x-1.0/itsyouonline.install

itsyouonline.install
<?php

/**
 * Implements hook_schema().
 */
function itsyouonline_schema() {
  $schema['itsyouonline_user_link'] = array(
    'description' => 'Stores the links between Drupal users and itsyou.online users.',
    'fields' => array(
      'drupal_uid' => array(
        'description' => 'Drupal user ID',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'itsyou_uid' => array(
        'description' => 'itsyou.online username',
        'type' => 'varchar',
        'length' => '36',
        'not null' => TRUE,
      ),
      'auth_data' => array(
        'description' => "Oauth token details",
        'type' => 'blob',
        'not null' => FALSE,
        'size' => 'normal',
        'serialize' => TRUE,
      ),
      'updated' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The time this was created or updated.',
      ),
    ),
    'primary key' => array('itsyou_uid'),
    'unique keys' => array(
      'drupal_uid' => array('drupal_uid'),
    ),
  );

  $schema['itsyouonline_user_data'] = array(
    'description' => 'Stores the user attributes received from itsyou.online.',
    'fields' => array(
      'itsyou_uid' => array(
        'description' => 'itsyou.online username',
        'type' => 'varchar',
        'length' => '36',
        'not null' => TRUE,
      ),
      'attribute_key' => array(
        'description' => 'The attribute key.',
        'type' => 'varchar',
        'length' => '128',
        'not null' => TRUE,
      ),
      'attribute_value' => array(
        'description' => 'The attribute value.',
        'type' => 'varchar',
        'length' => '1024',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array('itsyou_uid', 'attribute_key'),
  );

  return $schema;
}


Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc