You are here

function bakery_schema in Bakery Single Sign-On System 8.2

Same name and namespace in other branches
  1. 6.2 bakery.install \bakery_schema()
  2. 7.4 bakery.install \bakery_schema()
  3. 7.2 bakery.install \bakery_schema()
  4. 7.3 bakery.install \bakery_schema()

Implements hook_schema().

File

./bakery.install, line 11
Db table for bakery functionlities.

Code

function bakery_schema() {
  return [
    'bakery_user' => [
      'description' => 'Keep track of UID on subsites, master only.',
      'fields' => [
        'uid' => [
          'description' => 'User ID on master site.',
          'type' => 'int',
          'unsigned' => TRUE,
          'not null' => TRUE,
        ],
        'slave' => [
          'description' => 'Slave site.',
          'type' => 'varchar',
          'length' => 128,
          'not null' => TRUE,
        ],
        'slave_uid' => [
          'description' => 'User ID on slave site.',
          'type' => 'int',
          'unsigned' => TRUE,
          'not null' => TRUE,
        ],
      ],
      'primary key' => [
        'uid',
        'slave',
      ],
    ],
  ];
}