You are here

function potx_exportables_schema in Potx exportables 7

Implements hook_schema().

File

./potx_exportables.install, line 10
Schema definition for Potx Exportables.

Code

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;
}