function protected_node_schema in Protected Node 6
Same name and namespace in other branches
- 7 protected_node.install \protected_node_schema()
- 1.0.x protected_node.install \protected_node_schema()
Implementation of hook_schema().
File
- ./
protected_node.install, line 96
Code
function protected_node_schema() {
$schema['protected_nodes'] = array(
'description' => t('The table to store the node - password hash pairs.'),
'fields' => array(
'nid' => array(
'description' => t('The primary identifier for a node'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'protected_node_is_protected' => array(
'description' => t('Whether this node is currently protected.'),
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
'protected_node_passwd' => array(
'description' => t('The sha1 hashed password for the given node.'),
'type' => 'char',
'length' => 40,
'not null' => TRUE,
'default' => '',
),
'protected_node_passwd_changed' => array(
'description' => t('Date when the password was last changed'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'protected_node_show_title' => array(
'description' => t('Whether the title of the node should also be protected.'),
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
'protected_node_hint' => array(
'description' => t('A hint about the password on this node.'),
'type' => 'text',
),
),
'indexes' => array(
'protected_is_protected' => array(
'protected_node_is_protected',
),
'protected_passwd' => array(
'protected_node_passwd',
),
),
'primary key' => array(
'nid',
),
);
return $schema;
}