function ban_schema

ban_schema()

Implements hook_schema().

File

core/modules/ban/ban.install, line 11
Install, update and uninstall functions for the Ban module.

Code

function ban_schema() {
  $schema['ban_ip'] = array(
    'description' => 'Stores banned IP addresses.',
    'fields' => array(
      'iid' => array(
        'description' => 'Primary Key: unique ID for IP addresses.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'ip' => array(
        'description' => 'IP address',
        'type' => 'varchar_ascii',
        'length' => 40,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'indexes' => array(
      'ip' => array('ip'),
    ),
    'primary key' => array('iid'),
  );
  return $schema;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!ban!ban.install/function/ban_schema/8.1.x