You are here

function fb_tab_schema in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 fb_tab.install \fb_tab_schema()

File

./fb_tab.install, line 22
Installs database tables and settings required by fb_tab module.

Code

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;
}