You are here

tacjs_log.install in TacJS 8.6

File

tacjs_log/tacjs_log.install
View source
<?php

/**
 * Creates the tables using the schema API.
 */
function tacjs_log_schema() {
  $schema['tacjslog'] = array(
    '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;
}

Functions

Namesort descending Description
tacjs_log_schema Creates the tables using the schema API.