Projet

Général

Profil

Paste
Télécharger (2,1 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / i18n / i18n_translation / i18n_translation.install @ 76df55b7

1
<?php
2

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

    
8
/**
9
 * Implements hook_install().
10
 */
11
function i18n_translation_install() {
12

    
13
}
14

    
15
/**
16
 * Implements hook_schema().
17
 */
18
function i18n_translation_schema() {
19
  $schema['i18n_translation_set'] = array(
20
    'description' => 'Translation set.',
21
    'fields' => array(
22
      'tsid' => array(
23
        'description' => 'The primary identifier for a translation set.',
24
        'type' => 'serial',
25
        'unsigned' => TRUE,
26
        'not null' => TRUE,
27
      ),
28
      'title' => array(
29
        'description' => 'The title of this translation set, always treated as non-markup plain text.',
30
        'type' => 'varchar',
31
        'length' => 255,
32
        'not null' => TRUE,
33
        'default' => '',
34
      ),
35
      'type' => array(
36
        'description' => 'Object type or entity type.',
37
        'type' => 'varchar',
38
        'length' => 32,
39
        'not null' => TRUE,
40
        'default' => ''
41
      ),
42
      'bundle' => array(
43
        'description' => 'Optional bundle for entity translation sets.',
44
        'type' => 'varchar',
45
        'length' => 128,
46
        'not null' => TRUE,
47
        'default' => ''
48
      ),
49
      'master_id' => array(
50
        'description' => 'The master object/entity id (the others will be synchronized with this one).',
51
        'type' => 'int',
52
        'unsigned' => TRUE,
53
        'not null' => TRUE,
54
        'default' => 0,
55
      ),
56
      'status' => array(
57
        'description' => 'Status of this translation set. TBD.',
58
        'type' => 'int',
59
        'not null' => TRUE,
60
        'default' => 1,
61
      ),
62
      'created' => array(
63
        'description' => 'The Unix timestamp when the set was created.',
64
        'type' => 'int',
65
        'not null' => TRUE,
66
        'default' => 0,
67
      ),
68
      'changed' => array(
69
        'description' => 'The Unix timestamp when the set was most recently saved.',
70
        'type' => 'int',
71
        'not null' => TRUE,
72
        'default' => 0,
73
      ),
74
    ),
75
    'indexes' => array(
76
      'entity_bundle' => array('type', 'bundle'),
77
    ),
78
    'primary key' => array('tsid'),
79
  );
80

    
81
  return $schema;
82
}
83