You are here

function internal_nodes_schema in Internal Nodes 7

Implements hook_schema().

File

./internal_nodes.install, line 25
Installation file for the Internal node module

Code

function internal_nodes_schema() {
  $schema['internal_nodes'] = array(
    'description' => 'Stores action settings for nodes.',
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The {node}.nid to store settings.',
      ),
      'action' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The action to take when the node is accessed.',
      ),
      'url' => array(
        'type' => 'varchar',
        'length' => 256,
        'not null' => FALSE,
        'default' => '',
        'description' => 'The redirect URL.',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
    'foreign keys' => array(
      'internal_nodes_node' => array(
        'table' => 'node',
        'columns' => array(
          'nid' => 'nid',
        ),
      ),
    ),
  );
  return $schema;
}