Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. function document_search_schema()
  2. {
  3. $schema['document_search_content'] = [
  4. 'description' => 'Document content',
  5. 'fields' => [
  6. 'id' => array(
  7. 'description' => 'The primary identifier for the record',
  8. 'type' => 'serial',
  9. 'unsigned' => TRUE,
  10. 'not null' => TRUE
  11. ),
  12. 'mid' =>[
  13. 'description' => 'Primary key: {media}.mid for media',
  14. 'type' => 'int',
  15. 'unsigned' => TRUE,
  16. 'not null' => TRUE,
  17. 'default' => 0
  18. ],
  19. 'node_field_data_nid' =>[
  20. 'description' => 'Primary key: {node_field_data}.nid for node_field_data',
  21. 'type' => 'int',
  22. 'unsigned' => TRUE,
  23. 'not null' => TRUE
  24. ],
  25. 'node_field_data_langcode' =>[
  26. 'description' => 'Primary key: {node_field_data}.langcode for node_field_data',
  27. 'type' => 'varchar',
  28. 'length' => 255,
  29. 'not null' => TRUE
  30. ],
  31. 'name' => [
  32. 'description' => 'Title of document',
  33. 'type' => 'text',
  34. 'not null' => TRUE,
  35. 'size' => 'normal',
  36. ],
  37. 'content' => [
  38. 'description' => 'Content of document',
  39. 'type' => 'text',
  40. 'not null' => TRUE,
  41. 'size' => 'big',
  42. ]
  43. ],
  44. 'foreign keys' => array(
  45. 'fk_node_field_data' => array(
  46. 'table' => 'node_field_data',
  47. 'columns' => array(
  48. 'nid' => 'nid',
  49. 'langcode' => 'langcode'
  50. ),
  51. ),
  52. 'fk_media' => array(
  53. 'table' => 'media',
  54. 'columns' => array(
  55. 'mid' => 'mid',
  56. ),
  57. ),
  58. ),
  59. 'primary key' => ['id'],
  60. ];
  61.  
  62. return $schema;
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement