You are here

function user_revision_schema_alter in User Revision 7

Same name and namespace in other branches
  1. 7.2 user_revision.module \user_revision_schema_alter()

Implements hook_schema_alter().

4 calls to user_revision_schema_alter()
user_revision_disable in ./user_revision.install
Implements hook_disable().
user_revision_enable in ./user_revision.install
Implements hook_enable().
user_revision_install in ./user_revision.install
Implements hook_install().
user_revision_uninstall in ./user_revision.install
Implements hook_uninstall().

File

./user_revision.module, line 195
Enables user revision.

Code

function user_revision_schema_alter(&$schema) {
  $schema['users']['fields']['vid'] = array(
    'description' => 'The current {user_revision}.vid version identifier.',
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  );
  $schema['users']['fields']['ip'] = array(
    'description' => 'The users\'s ip address',
    'type' => 'varchar',
    'length' => 256,
    'not null' => TRUE,
    'default' => '',
  );
  $schema['users']['foreign keys']['user_revision'] = array(
    'table' => 'user_revision',
    'columns' => array(
      'vid' => 'vid',
    ),
  );
  $schema['users']['unique keys']['vid'] = array(
    'vid',
  );
}