You are here

function object_log_schema in Object Log 8

Same name and namespace in other branches
  1. 7 object_log.install \object_log_schema()

Implements hook_schema().

Create the log table where we store objects.

File

./object_log.install, line 7

Code

function object_log_schema() {
  $schema['object_log'] = array(
    'description' => 'Stores variables for later inspection.',
    'fields' => array(
      'label' => array(
        'description' => 'Primary Key: Unique object label.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'data' => array(
        'description' => 'A variable to log.',
        'type' => 'blob',
        'not null' => FALSE,
        'size' => 'big',
      ),
      'created' => array(
        'description' => 'A Unix timestamp indicating when the log entry was created.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'label',
    ),
  );
  return $schema;
}