You are here

function tome_sync_schema in Tome 8

Implements hook_schema().

File

modules/tome_sync/tome_sync.install, line 11
Install, update, and uninstall functions for Tome Sync.

Code

function tome_sync_schema() {
  $schema['tome_sync_content_hash'] = [
    'description' => 'Stores hashes of normalized content.',
    'fields' => [
      'name' => [
        'description' => 'A content name',
        'type' => 'varchar_ascii',
        'length' => 256,
        'not null' => TRUE,
        'default' => '',
      ],
      'hash' => [
        'description' => 'A sha1 hash',
        'type' => 'varchar_ascii',
        'length' => 256,
        'not null' => TRUE,
        'default' => '',
      ],
    ],
    'indexes' => [
      'name' => [
        'name',
      ],
    ],
    'primary key' => [
      'name',
    ],
  ];
  return $schema;
}