function tacjs_schema in TacJS 8.5
Creates the tables using the schema API.
File
- ./
tacjs.install, line 8
Code
function tacjs_schema() {
$schema['tacjslog'] = [
'description' => 'The proof of consent.',
'fields' => [
'uid' => [
'description' => 'Primary Key: unique ID.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'timestamp' => [
'description' => 'The Timestamp.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'ip_address' => [
'description' => 'The IP address.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
],
'services_allowed' => [
'description' => 'The service.',
'type' => 'text',
'not null' => TRUE,
],
],
'primary key' => [
'uid',
],
'indexes' => [
'uid' => [
'uid',
],
],
];
return $schema;
}