nodejs.install in Node.js integration 6
Same filename and directory in other branches
Install, update and uninstall functions for the nodejs module.
File
nodejs.installView source
<?php
// $Id: $
/**
* @file
* Install, update and uninstall functions for the nodejs module.
*/
/**
* @file
* Install, update and uninstall functions for the nodejs module.
*/
/**
* Implements hook_uninstall().
*/
function nodejs_uninstall() {
variable_del('nodejs_server_scheme');
variable_del('nodejs_server_host');
variable_del('nodejs_server_port');
drupal_uninstall_schema('nodejs');
}
/**
* Implements hook_schema().
*/
function nodejs_schema() {
return array(
'nodejs_presence' => array(
'description' => 'List of currently online users on a node.js server.',
'fields' => array(
'uid' => array(
'description' => 'The uid of the user.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'login_time' => array(
'description' => 'The timestamp of when the user came online.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'login_time' => array(
'login_time',
),
),
'unique keys' => array(
'uid' => array(
'uid',
),
),
),
);
}
/**
* Implements hook_install().
*/
function nodejs_install() {
drupal_install_schema('nodejs');
}
Functions
Name | Description |
---|---|
nodejs_install | Implements hook_install(). |
nodejs_schema | Implements hook_schema(). |
nodejs_uninstall | Implements hook_uninstall(). |