field_object.install 609 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Implements hook_field_schema().
  4. */
  5. function field_object_field_schema(array $field) {
  6. return array(
  7. 'columns' => array(
  8. 'path' => array(
  9. 'type' => 'text',
  10. 'size' => 'tiny',
  11. 'description' => 'The path to the instance, represented as text.',
  12. ),
  13. ),
  14. );
  15. }
  16. /**
  17. * Fixes issue #2331553, and probably others.
  18. */
  19. function field_object_update_7001() {
  20. db_update('field_config')
  21. ->fields(array(
  22. 'type' => 'field_object',
  23. 'module' => 'field_object',
  24. ))
  25. ->condition('field_name', array('cer_left', 'cer_right'))
  26. ->execute();
  27. }