You are here

function node_limit_type_schema in Node Limit 8

Same name and namespace in other branches
  1. 6 node_limit_type/node_limit_type.install \node_limit_type_schema()
  2. 7 node_limit_type/node_limit_type.install \node_limit_type_schema()

Implements hook_schema().

File

old/node_limit_type/node_limit_type.install, line 11
Installation functions for module node_limit_type.

Code

function node_limit_type_schema() {
  $schema['node_limit_type'] = array(
    'description' => 'The table for applying node limits to a content type',
    'fields' => array(
      'lid' => array(
        'description' => 'The {node_limit}.lid',
        'type' => 'int',
        'not null' => TRUE,
      ),
      'type' => array(
        'description' => 'The {node}.type to which this limit applies',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    // The limit-type combination is unique.

    /*
     * this means that in the future, we may allow a limit to be applied to more
     * than one type.  right now, though, its one-type-per-limit.
     */
    'primary key' => array(
      'lid',
      'type',
    ),
  );
  return $schema;
}