search_api_test.install 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * @file
  4. * Install, update and uninstall functions for the Search API test module.
  5. */
  6. /**
  7. * Implements hook_schema().
  8. */
  9. function search_api_test_schema() {
  10. $schema['search_api_test'] = array(
  11. 'description' => 'Stores instances of a test entity.',
  12. 'fields' => array(
  13. 'id' => array(
  14. 'description' => 'The primary identifier for an item.',
  15. 'type' => 'serial',
  16. 'unsigned' => TRUE,
  17. 'not null' => TRUE,
  18. ),
  19. 'title' => array(
  20. 'description' => 'The title of the item.',
  21. 'type' => 'varchar',
  22. 'length' => 50,
  23. 'not null' => TRUE,
  24. ),
  25. 'body' => array(
  26. 'description' => 'A text belonging to the item.',
  27. 'type' => 'text',
  28. 'not null' => FALSE,
  29. ),
  30. 'type' => array(
  31. 'description' => 'A string identifying the type of item.',
  32. 'type' => 'varchar',
  33. 'length' => 50,
  34. 'not null' => TRUE,
  35. ),
  36. ),
  37. 'primary key' => array('id'),
  38. );
  39. return $schema;
  40. }