search_api_test.install 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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' => FALSE,
  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' => FALSE,
  35. ),
  36. 'keywords' => array(
  37. 'description' => 'A comma separated list of keywords.',
  38. 'type' => 'varchar',
  39. 'length' => 200,
  40. 'not null' => FALSE,
  41. ),
  42. 'prices' => array(
  43. 'description' => 'A comma separated list of prices.',
  44. 'type' => 'varchar',
  45. 'length' => 200,
  46. 'not null' => FALSE,
  47. ),
  48. ),
  49. 'primary key' => array('id'),
  50. );
  51. return $schema;
  52. }