diff core/modules/ban/ban.install @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/modules/ban/ban.install	Thu Jul 05 14:24:15 2018 +0000
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Install, update and uninstall functions for the Ban module.
+ */
+
+/**
+ * Implements hook_schema().
+ */
+function ban_schema() {
+  $schema['ban_ip'] = [
+    'description' => 'Stores banned IP addresses.',
+    'fields' => [
+      'iid' => [
+        'description' => 'Primary Key: unique ID for IP addresses.',
+        'type' => 'serial',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+      ],
+      'ip' => [
+        'description' => 'IP address',
+        'type' => 'varchar_ascii',
+        'length' => 40,
+        'not null' => TRUE,
+        'default' => '',
+      ],
+    ],
+    'indexes' => [
+      'ip' => ['ip'],
+    ],
+    'primary key' => ['iid'],
+  ];
+  return $schema;
+}