function nodejs_subscribe_schema in Node.js integration 6
Same name and namespace in other branches
- 7 nodejs_subscribe/nodejs_subscribe.install \nodejs_subscribe_schema()
Implements hook_schema().
File
- nodejs_subscribe/
nodejs_subscribe.install, line 6
Code
function nodejs_subscribe_schema() {
return array(
'nodejs_subscribe_subscription' => array(
'description' => 'Stores user subscriptions to nodes.',
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'unique keys' => array(
'name' => array(
'nid',
'uid',
),
),
),
'nodejs_subscribe_node' => array(
'description' => 'Stores per-node settings related to subscriptions.',
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'subscribe' => array(
'description' => 'Defines whether the node can be subscribed to (1) or not (0).',
'type' => 'int',
'unsigned' => TRUE,
),
),
'primary key' => array(
'nid',
),
),
);
}