Posted by TuTToWeB on November 19, 2009 at 3:09pm
2 followers
Jump to:
| Project: | Drupal core |
| Version: | 6.5 |
| Component: | base system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (works as designed) |
| Issue tags: | drupal_write_record, schema |
Issue Summary
I used drupal_write_record, passing a table's name that I added later using drupal_update_x hook.
But it doesn't work and I studied its code. I found drupal_get_schema function and I studied its code also. Finally i discovered in its $schema array there aren't table added not included in hook schema.
Comments
#1
Your hook_schema should always return the updated schema. In other words: If you add a table in hook_update_N, also add it to hook_schema.