ban.install 743 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * @file
  4. * Install, update and uninstall functions for the Ban module.
  5. */
  6. /**
  7. * Implements hook_schema().
  8. */
  9. function ban_schema() {
  10. $schema['ban_ip'] = array(
  11. 'description' => 'Stores banned IP addresses.',
  12. 'fields' => array(
  13. 'iid' => array(
  14. 'description' => 'Primary Key: unique ID for IP addresses.',
  15. 'type' => 'serial',
  16. 'unsigned' => TRUE,
  17. 'not null' => TRUE,
  18. ),
  19. 'ip' => array(
  20. 'description' => 'IP address',
  21. 'type' => 'varchar_ascii',
  22. 'length' => 40,
  23. 'not null' => TRUE,
  24. 'default' => '',
  25. ),
  26. ),
  27. 'indexes' => array(
  28. 'ip' => array('ip'),
  29. ),
  30. 'primary key' => array('iid'),
  31. );
  32. return $schema;
  33. }