You are here

potx_exportables.install in Potx exportables 7

Schema definition for Potx Exportables.

File

potx_exportables.install
View source
<?php

/**
 * @file
 * Schema definition for Potx Exportables.
 */

/**
 * Implements hook_schema().
 */
function potx_exportables_schema() {
  $schema = array();
  $schema['potx_exportables_log_entry'] = array(
    'description' => 'The base table for Potx Exportables',
    'fields' => array(
      'id' => array(
        'description' => 'Primary key the table.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => 'The identifier name for the Exportable.',
        'type' => 'varchar',
        'length' => '100',
        'not null' => TRUE,
      ),
      'hash' => array(
        'description' => 'The generated hash for the Exportable.',
        'type' => 'varchar',
        'length' => '40',
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'easy_exportables_log_entry_name' => array(
        'name',
      ),
      'easy_exportables_log_entry_hash' => array(
        'hash',
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'unique keys' => array(
      'identifier' => array(
        'name',
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
potx_exportables_schema Implements hook_schema().