function nodejs_subscribe_schema in Node.js integration 7
Same name and namespace in other branches
- 6 nodejs_subscribe/nodejs_subscribe.install \nodejs_subscribe_schema()
Implements hook_schema().
1 call to nodejs_subscribe_schema()
- nodejs_subscribe_update_7000 in nodejs_subscribe/
nodejs_subscribe.install - Create the {nodejs_subscribe_node} table.
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',
),
),
);
}