comparison core/modules/ban/ban.install @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 /**
4 * @file
5 * Install, update and uninstall functions for the Ban module.
6 */
7
8 /**
9 * Implements hook_schema().
10 */
11 function ban_schema() {
12 $schema['ban_ip'] = [
13 'description' => 'Stores banned IP addresses.',
14 'fields' => [
15 'iid' => [
16 'description' => 'Primary Key: unique ID for IP addresses.',
17 'type' => 'serial',
18 'unsigned' => TRUE,
19 'not null' => TRUE,
20 ],
21 'ip' => [
22 'description' => 'IP address',
23 'type' => 'varchar_ascii',
24 'length' => 40,
25 'not null' => TRUE,
26 'default' => '',
27 ],
28 ],
29 'indexes' => [
30 'ip' => ['ip'],
31 ],
32 'primary key' => ['iid'],
33 ];
34 return $schema;
35 }