first commit

This commit is contained in:
Robert Nasarek 2023-08-03 16:39:36 +02:00
commit d7ae7d3338
9 changed files with 470 additions and 0 deletions

View file

@ -0,0 +1,59 @@
<?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;
}