Projet

Général

Profil

Paste
Télécharger (905 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / media / modules / mediafield / mediafield.install @ e4215af7

1
<?php
2

    
3
/**
4
 * @file
5
 * Install and schema hooks for mediafield.
6
 */
7

    
8
/**
9
 * Implements hook_field_schema().
10
 */
11
function mediafield_field_schema($field) {
12
  return array(
13
    'columns' => array(
14
      'fid' => array(
15
        'type' => 'int',
16
        'unsigned' => TRUE,
17
        'not null' => FALSE,
18
      ),
19
      'title' => array(
20
        'type' => 'varchar',
21
        'length' => 255,
22
        'not null' => FALSE,
23
      ),
24
      'data' => array(
25
        'type' => 'text',
26
        'not null' => FALSE,
27
        'size' => 'big',
28
        'serialize' => TRUE,
29
        // 'description' => 'Used for storing additional information.
30
        // Can be harnessed by widgets',
31
      ),
32
    ),
33
    'indexes' => array(
34
      'fid' => array('fid'),
35
    ),
36
    'foreign keys' => array(
37
      'file_managed' => array(
38
        'table' => 'file_managed',
39
        'columns' => array('fid' => 'fid'),
40
      ),
41
    ),
42
  );
43
}