cilogon_auth-8.x-1.1/cilogon_auth.install

cilogon_auth.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the CILogon Auth module.
 */

/**
 * Implements hook_schema().
 */
function cilogon_auth_schema() {
  $schema['cilogon_auth_authmap'] = [
    'description' => 'Stores CILogon Auth authentication mapping.',
    'fields' => [
      'aid' => [
        'description' => 'Primary Key: Unique authmap ID.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'uid' => [
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => "User's {users}.uid.",
      ],
      'client_name' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The client name.',
      ],
      'sub' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'Unique subject identifier.',
      ],
      'idp_name' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
        'default' => '',
        'description' => 'The name of the connect idp.',
      ],
    ],
    'primary key' => ['aid'],
    'indexes' => [
      'uid' => ['uid'],
      'identifier' => ['client_name', 'sub','idp_name'],
    ],
    'foreign keys' => [
      'user' => [
        'table' => 'users',
        'columns' => ['uid' => 'uid'],
      ],
    ],
  ];

  return $schema;
}

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

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