Project

General

Profile

« Previous | Next » 

Revision 2a3a2a4f

Added by Andreas Kohlbecker almost 2 years ago

ref #9659 database table scheme for ext_links

View differences:

modules/cdm_dataportal/ext_links/ext_links.install
1
<?php
2

  
3
/**
4
 * @file
5
 * Install, update, and uninstall functions for the ext_links module.
6
 */
7

  
8
/**
9
 * Implements hook_schema().
10
 */
11
function ext_links_schema() {
12
  $schema['ext_links'] = [
13
    'description' => 'Table external link templates.',
14
    'fields' => [
15
      'id' => [
16
        'type' => 'varchar',
17
        'length' => 32,
18
        'not null' => TRUE,
19
        'default' => '',
20
        'description' => 'Name of the ext_link being referenced.',
21
      ],
22
      'title' => [
23
        'type' => 'varchar',
24
        'length' => 255,
25
        'not null' => TRUE,
26
        'description' => 'The link title',
27
      ],
28
      'link' => [
29
        'type' => 'varchar',
30
        'length' => 255,
31
        'not null' => TRUE,
32
        'description' => 'The link url template',
33
      ],
34
      'glue' => [
35
        'type' => 'varchar',
36
        'length' => 10,
37
        'not null' => TRUE,
38
        'description' => 'The string to concatenate name parts in the URL query string',
39
      ],
40
      'weight' => [
41
        'type' => 'int',
42
        'not null' => TRUE,
43
        'default' => 0,
44
        'description' => 'Weight of filter within format.',
45
      ],
46
      'status' => [
47
        'type' => 'int',
48
        'not null' => TRUE,
49
        'default' => 0,
50
        'description' => 'External link enabled status. (1 = enabled, 0 = disabled)',
51
      ],
52
    ],
53
    'primary key' => ['id'],
54
    'indexes' => [
55
      'list' => ['weight', 'id'],
56
    ],
57
  ];
58

  
59
  return $schema;
60
}

Also available in: Unified diff