summaryrefslogtreecommitdiffstats
path: root/fb_tab.install
blob: 147287a9336b11a494a8d44927c227045d3e8f73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php

/**
 * @file
 * Installs database tables and settings required by fb_tab module.
 *
 */

/**
 * Implements hook_install()
 */
function fb_tab_install() {
  drupal_set_message(st('Facebook Tab module installed.', array('!perm' => url('admin/people/permissions'), '!create' => url('admin/structure/fb') /* FB_PATH_ADMIN */)));
}

/**
 * Implement hook_uninstall()
 */
function fb_tab_uninstall() {
}

function fb_tab_schema() {
  $schema['fb_tab'] = array(
    'description' => 'Main fb_tab table. Presents tabs to user and manages configuration data for different tab views.',
    'fields' => array(
      'fb_tab_id' => array(
        'description' => 'The primary identifier.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE),
      'label' => array(
        'description' => 'Facebook application label.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => ''),
      'profile_id' => array(
        'description' => 'profile id (which tab is calling)',
        'type' => 'int',
        'size' => 'big',
        'not null' => TRUE),
      'created' => array(
        'description' => 'The Unix timestamp when the row was created.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0),
      'data' => array(
        'type' => 'text',
        'size' => 'big',
        'description' => 'Serialized generic data.',
        'default' => NULL,
      ),
    ),
    'primary key' => array('fb_tab_id'),
    'unique keys' => array(
      'fb_tab' => array('label', 'profile_id'),
    ),
  );

  return $schema;
}