You are here

function nodesinblock_schema in Nodes In Block 7

Same name and namespace in other branches
  1. 6 nodesinblock.install \nodesinblock_schema()

Implements hook_schema().

File

./nodesinblock.install, line 21
Nodes in block install file.

Code

function nodesinblock_schema() {
  $schema['nodesinblock'] = array(
    'description' => 'Nodes in block table.',
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'The ID of the node.',
      ),
      'delta' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'size' => 'tiny',
        'description' => 'The delta of the block.',
      ),
      'weight' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The order of the node in the block.',
      ),
      'visibility' => array(
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'big',
        'description' => 'Visibility settings.',
      ),
      'render' => array(
        'type' => 'varchar',
        'length' => 40,
        'not null' => TRUE,
        'default' => '',
        'description' => 'Render type of node in block, teaser, page or a nd string.',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
    'indexes' => array(
      'list' => array(
        'nid',
        'delta',
      ),
    ),
  );
  return $schema;
}