I've been running into issues with drush updb and uuid, resulting in

Error: Call to undefined function uuid_schema_field_definition()

which is triggered by line 19 in the .install file.

The discussion at http://drupal.org/node/1309302 suggests that implementations of hook_schema_alter() should live in the .module file.

Comments

mcjim’s picture

Status: Active » Needs review
StatusFileSize
new1.45 KB

Patch attached.

dave reid’s picture

Status: Needs review » Needs work

We're fixing the wrong problem here. The actual problem is that the uuid_schema_field_definition() function is defined in uuid.module. When a module's hook_install is run, it *cannot* assume that the .module file is loaded yet and must manually use drupal_load() to make the .module's files available.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new1.25 KB

Since the schema helper function is called from the .install file only, I think we need to move the uuid_schema_field_definition() function to uuid.install instead.

mcjim’s picture

Status: Needs review » Reviewed & tested by the community

Yes, this makes total sense and is the better solution.

Thanks for your input.

dixon_’s picture

Status: Reviewed & tested by the community » Fixed

I was thinking the function should be provided as a generic helper function. But what Dave is saying makes a lot of sense.

Committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Corrected typos.