[development] Foreign keys in Drupal 6

Earnie Boyd earnie at users.sourceforge.net
Wed Jun 13 17:27:06 UTC 2007


Quoting Barry Jaspan <barry at jaspan.org>:

>
> "Fernando Silva" <fsilva.pt at gmail.com> writes:
>> Options for disabling:
>> * "do you wish to clear all inserted data?"
>
> If we use RESTRICT on delete, the only possible answer to that
> question is "yes", so this would just be a standard confirmation
> screen.  Also, since we will have to clear all a module's data when it
> is disabled, we'd be making "disable" the same as "uninstall."
>

-1 for uninstall on disable.

> Do people think eliminating the "disabled" state so only
> installed/uninstalled states exist is a good idea?
>

No.  I may want to disable a module for a moment then continue using it 
after some modification or time period.

>> * system should always run "delete" even if it is disabled
>
> This would mean that even disabled modules get parsed and executed;
> that violates my sense of what "disabled" means (and re-introduces
> performance penalties eliminating by .info files).
>

I haven't looked to see the changes yet for D6 but for D5 the module is 
included even if it is disabled.  This also violates my sense of what 
"disabled" means.  I've been bitten by this before.  Back to the delete 
hook.  If I have the module installed but disabled and I have node 
dependencies in my module table then I would want my module table data 
delete with the node.

What if we consider, [Deactivate] and [Disable] where [Deactivate] 
causes your idea of all data being removed and [Disable] leaves the 
data in place?  If disabled the delete hook is still called while a 
deactivated module has no affect since it no longer has data.

Earnie


More information about the development mailing list