59 lines
1.4 KiB
Text
59 lines
1.4 KiB
Text
<?php
|
|
use Drupal\Core\Database\Database;
|
|
|
|
/**
|
|
* Implements hook_schema().
|
|
*/
|
|
function wisski_cloud_account_manager_schema(): array {
|
|
$schema['wisski_cloud_accounts'] = [
|
|
'description' => 'The table for storing the WissKI Cloud users data.',
|
|
'fields' => [
|
|
'id' => [
|
|
'description' => 'The primary identifier for user. Same as in mongo db.',
|
|
'type' => 'char',
|
|
'length' => 24,
|
|
'not null' => TRUE,
|
|
],
|
|
'personname' => [
|
|
'description' => 'Real person name.',
|
|
'type' => 'varchar',
|
|
'length' => 255,
|
|
'not null' => TRUE,
|
|
],
|
|
'organisation' => [
|
|
'description' => 'Organisation.',
|
|
'type' => 'varchar',
|
|
'length' => 255,
|
|
'not null' => TRUE,
|
|
],
|
|
'email' => [
|
|
'description' => 'Email',
|
|
'type' => 'varchar',
|
|
'length' => 255,
|
|
'not null' => TRUE,
|
|
|
|
],
|
|
'username' => [
|
|
'description' => 'User name.',
|
|
'type' => 'varchar',
|
|
'length' => 20,
|
|
'not null' => TRUE,
|
|
],
|
|
'subdomain' => [
|
|
'description' => 'Subdomain.',
|
|
'type' => 'varchar',
|
|
'length' => 20,
|
|
'not null' => TRUE,
|
|
],
|
|
'created' => [
|
|
'description' => 'Timestamp when the user was created.',
|
|
'type' => 'int',
|
|
'not null' => TRUE,
|
|
'default' => 0,
|
|
],
|
|
],
|
|
'primary key' => ['id'],
|
|
];
|
|
|
|
return $schema;
|
|
}
|