You are here

function node_limit_schema in Node Limit 8

Same name and namespace in other branches
  1. 6 node_limit.install \node_limit_schema()
  2. 7 node_limit.install \node_limit_schema()

Implements hook_schema().

File

old/node_limit.install, line 15

Code

function node_limit_schema() {
  $schema['node_limit'] = array(
    'description' => 'The base Node Limit table',
    'fields' => array(
      'lid' => array(
        'description' => 'The limit id',
        'type' => 'int',
        'not null' => TRUE,
      ),
      'type' => array(
        'description' => 'The {node}.type to which this limit applies',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'nlimit' => array(
        'description' => 'The node limit for this limit',
        'type' => 'int',
        'not null' => TRUE,
        'default' => NODE_LIMIT_NO_LIMIT,
      ),
      'title' => array(
        'description' => 'The display name for this limit',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'weight' => array(
        'description' => 'The weight of this limit',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'lid',
    ),
  );
  return $schema;
}