realname.install in Real Name 8
Same filename and directory in other branches
Installation file for Realname module.
File
realname.installView source
<?php
/**
* @file
* Installation file for Realname module.
*/
/**
* Implements hook_schema().
*/
function realname_schema() {
$schema['realname'] = [
'description' => 'Computed Real Names to reduce overhead.',
'fields' => [
'uid' => [
'description' => 'User ID, links to User table.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'realname' => [
'description' => 'The generated real name of the user.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
],
'created' => [
'description' => 'The UNIX timestamp of when the real name was created.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
],
'primary key' => [
'uid',
],
'indexes' => [
'realname' => [
'realname',
],
],
'foreign keys' => [
'users' => [
'table' => 'users',
'columns' => [
'uid' => 'uid',
],
],
],
];
return $schema;
}
Functions
Name | Description |
---|---|
realname_schema | Implements hook_schema(). |