You are here

function linkchecker_schema in Link checker 8

Same name and namespace in other branches
  1. 6.2 linkchecker.install \linkchecker_schema()
  2. 7 linkchecker.install \linkchecker_schema()

Implements hook_schema().

File

./linkchecker.install, line 26
Installation file for Link Checker module.

Code

function linkchecker_schema() {
  $schema['linkchecker_index'] = [
    'description' => 'Stores entities from which links where extracted.',
    'fields' => [
      'entity_id' => [
        'type' => 'int',
        'not null' => TRUE,
        'description' => 'Entity ID.',
      ],
      'entity_type' => [
        'type' => 'varchar',
        'length' => EntityTypeInterface::ID_MAX_LENGTH,
        'not null' => TRUE,
        'description' => "Entity type.",
      ],
      'last_extracted_time' => [
        'type' => 'int',
        'not null' => TRUE,
        'description' => 'Stores time when extraction from entity was executed.',
      ],
    ],
    'primary key' => [
      'entity_id',
      'entity_type',
    ],
  ];
  return $schema;
}