id4me-2.0.x-dev/id4me.install

id4me.install
<?php

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

/**
 * Implements hook_schema().
 */
function id4me_schema() {
  $schema['id4me_authmap'] = [
    'description' => 'Stores remote to local 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.",
      ],
      'iss' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The issuer identifier.',
      ],
      'sub' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'Unique subject identifier.',
      ],
    ],
    'primary key' => ['aid'],
    'indexes' => [
      'uid' => ['uid'],
      'identifier' => ['iss', 'sub'],
    ],
    'foreign keys' => [
      'user' => [
        'table' => 'users',
        'columns' => ['uid' => 'uid'],
      ],
    ],
  ];
  return $schema;
}

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

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