materio_showroom.install 933 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * @file
  4. * Install, update, and uninstall functions for the field_example module.
  5. */
  6. /**
  7. * Implements hook_field_schema().
  8. *
  9. * Defines the database schema of the field, using the format used by the
  10. * Schema API.
  11. *
  12. * The data we will store here is just one 7-character element, even
  13. * though the widget presents the three portions separately.
  14. *
  15. * All implementations of hook_field_schema() must be in the module's
  16. * .install file.
  17. *
  18. * @see http://drupal.org/node/146939
  19. * @see schemaapi
  20. * @see hook_field_schema()
  21. * @ingroup field_example
  22. */
  23. function materio_showroom_field_schema($field) {
  24. $columns = array(
  25. 'showroom_tid' => array('type' => 'int', 'not null' => FALSE),
  26. 'location' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
  27. );
  28. $indexes = array(
  29. 'location' => array('location'),
  30. );
  31. return array(
  32. 'columns' => $columns,
  33. 'indexes' => $indexes,
  34. );
  35. }