Posted by sven.lauer on October 18, 2011 at 4:15am
7 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | documentation |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | needs backport to D7, Novice, Quick fix |
Issue Summary
The current api doc for hook_schema() does not mention at all that the database tables returned by implementations will be automatically created. Yes, everyone KNOWS that. Except those who don't. Strangely, the doc for hook_install() actually provides this information, but it really should be in the hook_schema doc as well.
(Will roll a patch.)
Comments
#1
And a patch.
#2
Thanks, this looks like a good addition to the docs! I also verified by looking at module_enable() and drupal_uninstall_modules() that the doc is correct about when things happen.
#3
#1: doc-hook_schema-autoloaded-1312844-1.patch queued for re-testing.
#4
The last submitted patch, doc-hook_schema-autoloaded-1312844-1.patch, failed testing.
#5
Ah, I guess this patch conflicted with the one in #1307062: install file hooks should state whether module code is available. Re-rolling.
(If the testbot is happy, I'll set this back to RTBC, as nothing has changed.)
#6
#7
Thanks! Committed to 8.x. Leaving RTBC for 7.
#8
#5: doc-hook_schema-autoloaded-1312844-5.patch queued for re-testing.
#9
Committed and pushed to 7.x. Thanks!
#10
+ * creation and alteration of the supported database engines ** See the Schema API Handbook at http://drupal.org/node/146843 for
Did someone type backspace when they meant to type a period?... Strange, they aren't even close to each other on the keyboard :)
#11
Whoops.
#12
Whoops indeed. At least three of us missed that. Thanks David!
Good novice issue to fix that problem...
#13
Since patch from comment#5 was already committed, this patch corrects only comment #10.
#14
Looks good, thanks :)
#15
After committing, this needs to be D7 / to be ported, and a patch made combining #13 and #5. Thanks!
#16
I think #5 was already committed to D7, actually? (In which case this followup can just go into both D7 and D8 at the same time.)
#17
True. :)
#18
#13: doc-hook_schema-autoloaded-1312844-13.patch queued for re-testing.
#19
The last submitted patch, doc-hook_schema-autoloaded-1312844-13.patch, failed testing.
#20
#13: doc-hook_schema-autoloaded-1312844-13.patch queued for re-testing.
#21
The last submitted patch, doc-hook_schema-autoloaded-1312844-13.patch, failed testing.
#22
Re-rolled for D8 core dir change - 11/1/11
#23
Looks good, thanks for fixing (and re-rolling the fix for) my oversight!
This will need a re-re-roll for D7 once committed.
#24
Committed/pushed to 8.x, thanks! Moving to 7.x.
#25
#13: doc-hook_schema-autoloaded-1312844-13.patch queued for re-testing.
#26
Thanks, looks like #13 is good for D7. Not very controversial to apply it. :)
#27
Committed and pushed to 7.x. Thanks!
#28
Automatically closed -- issue fixed for 2 weeks with no activity.