Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
field system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2009 at 21:19 UTC
Updated:
12 Jul 2010 at 19:48 UTC
Jump to comment: Most recent file
Comments
Comment #1
yched commentedTypo in the title
Comment #2
moshe weitzman commentedBye bye code.
Comment #3
chx commentedlet's not touch field_sql_storage. Requiring it is a hack until handlers in place.
Comment #4
webchickCommitted #3 to HEAD. Thanks!
Comment #5
yched commentedReopening for :
"currently all required modules (filter, node, user) have their schema created by system_install() rather than in their own hook_install(). If that's a pattern, should field.module do the same ?"
Comment #6
webchickNode has its schema in node.install: http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/node/node.install?...
Same with User: http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/user/user.install?...
And with Filter: http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/filter/filter.inst...
So I'm a bit confused as to the question?
The only tables that should be defined in system.install are those that are required by .inc files, regardless of what modules are enabled. So Actions, Menu, Path, etc. fall under this. Anything else that's dealt with in purely a module (whether it's required or not) should be in that module's .install file to match what we do in contrib.
Tentatively marking back to fixed, but please re-open if there are still unanswered questions.
Comment #7
yched commentedThe schema *definitions* live in each module's hook_schema() alright, but the tables are not *created* in hook_install() like for regular modules. node has no node_install(), user has no user_install(), filter etc...
system_install() does:
So my question is :
- is that a coincidence that it happens to be the case just for the modules are required ? (something whispers 'no')
- If it is deemed important that required modules have their tables created before any other module or even themselves are installed, then maybe field should follow that rule too ?
Comment #8
yched commentedand reopening ;-)
Comment #9
webchickOH! Sorry! :) I misunderstood!
I actually am not aware of the reasoning behind those lines of code, but I agree that putting field there as well probably makes a lot of sense, for consistency.
Comment #10
Island Usurper commentedOh, hello, year-old issue! #306151: Automatically install/uninstall schema obsoletes this, since system_install() doesn't create tables any more (except its own).