You are here

function fb_app_schema in Drupal for Facebook 6.2

Same name and namespace in other branches
  1. 6.3 fb_app.install \fb_app_schema()
  2. 7.3 fb_app.install \fb_app_schema()

File

./fb_app.install, line 27
Installs database tables and settings required by fb_app module.

Code

function fb_app_schema() {
  $schema['fb_app'] = array(
    'description' => 'Main fb_app table',
    'fields' => array(
      'fba_id' => array(
        'description' => 'The primary identifier for an app.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'status' => array(
        'description' => 'Boolean indicating whether the app is enabled.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
      // nid for backward-compatibility only.  DEPRECATED and will be removed!
      'nid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'label' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'Unique textual id for app.',
      ),
      'apikey' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'Provided by facebook, copy and pasted by user',
      ),
      'id' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'Provided by facebook, copy and pasted by user',
      ),
      'secret' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'Provided by facebook, copy and pasted by user',
      ),
      'canvas' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'We learn this from facebook app properties',
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'We learn this from facebook app properties',
      ),
      'data' => array(
        'type' => 'text',
        'size' => 'big',
        'description' => 'Module-specific additional settings.',
      ),
    ),
    'unique keys' => array(
      'apikey' => array(
        'apikey',
      ),
      'label' => array(
        'label',
      ),
    ),
    'primary key' => array(
      'fba_id',
    ),
  );
  return $schema;
}