You are here

function patchinfo_schema in PatchInfo 8

Same name and namespace in other branches
  1. 8.2 patchinfo.install \patchinfo_schema()
  2. 7 patchinfo.install \patchinfo_schema()

Implements hook_schema().

File

./patchinfo.install, line 11
Install, update, and uninstall functions for the Patch Info module.

Code

function patchinfo_schema() {
  $schema = [];
  $schema['patchinfo'] = [
    'description' => 'Information on patches in modules',
    'fields' => [
      'module' => [
        'description' => 'Machine readable name of module',
        'type' => 'varchar',
        'length' => '50',
        'not null' => TRUE,
      ],
      'id' => [
        'description' => 'Index of patch in module',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'url' => [
        'description' => 'Patch URL',
        'type' => 'text',
        'not null' => TRUE,
      ],
      'info' => [
        'description' => 'Additional information',
        'type' => 'text',
        'not null' => TRUE,
      ],
    ],
    'primary key' => [
      'module',
      'id',
    ],
  ];
  return $schema;
}