i18n_translation.install 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /**
  3. * @file
  4. * Install, update and uninstall functions for the text module.
  5. */
  6. /**
  7. * Implements hook_install().
  8. */
  9. function i18n_translation_install() {
  10. }
  11. /**
  12. * Implements hook_schema().
  13. */
  14. function i18n_translation_schema() {
  15. $schema['i18n_translation_set'] = array(
  16. 'description' => 'Translation set.',
  17. 'fields' => array(
  18. 'tsid' => array(
  19. 'description' => 'The primary identifier for a translation set.',
  20. 'type' => 'serial',
  21. 'unsigned' => TRUE,
  22. 'not null' => TRUE,
  23. ),
  24. 'title' => array(
  25. 'description' => 'The title of this translation set, always treated as non-markup plain text.',
  26. 'type' => 'varchar',
  27. 'length' => 255,
  28. 'not null' => TRUE,
  29. 'default' => '',
  30. ),
  31. 'type' => array(
  32. 'description' => 'Object type or entity type.',
  33. 'type' => 'varchar',
  34. 'length' => 32,
  35. 'not null' => TRUE,
  36. 'default' => ''
  37. ),
  38. 'bundle' => array(
  39. 'description' => 'Optional bundle for entity translation sets.',
  40. 'type' => 'varchar',
  41. 'length' => 128,
  42. 'not null' => TRUE,
  43. 'default' => ''
  44. ),
  45. 'master_id' => array(
  46. 'description' => 'The master object/entity id (the others will be synchronized with this one).',
  47. 'type' => 'int',
  48. 'unsigned' => TRUE,
  49. 'not null' => TRUE,
  50. 'default' => 0,
  51. ),
  52. 'status' => array(
  53. 'description' => 'Status of this translation set. TBD.',
  54. 'type' => 'int',
  55. 'not null' => TRUE,
  56. 'default' => 1,
  57. ),
  58. 'created' => array(
  59. 'description' => 'The Unix timestamp when the set was created.',
  60. 'type' => 'int',
  61. 'not null' => TRUE,
  62. 'default' => 0,
  63. ),
  64. 'changed' => array(
  65. 'description' => 'The Unix timestamp when the set was most recently saved.',
  66. 'type' => 'int',
  67. 'not null' => TRUE,
  68. 'default' => 0,
  69. ),
  70. ),
  71. 'indexes' => array(
  72. 'entity_bundle' => array('type', 'bundle'),
  73. ),
  74. 'primary key' => array('tsid'),
  75. );
  76. return $schema;
  77. }