[development] Best place to store user data

Moshe Weitzman weitzman at tejasa.com
Tue Mar 17 11:49:25 UTC 2009

> So let me add a bit to the question because I just came across it in a
> contrib. Let's say you need one field that exactly matches a core table. Is
> it ever okay, upgrades aside, to add that column to the core table? Some
> things I've read about D7 seem to indicate this will be okay in D7. The use
> of "drupal_write_record"  really makes this a convenient practice.

Depends on who you ask. My position is that adding a column to a
foreign table is OK if the code will not be shared. IOW, custom code
for your own site. It is especially OK for the user table since it has
built in support for custom columns. I discourage this practice for
Contrib modules since the users of the module are usually unprepared
to evaluate the upgrade risks involved.

More information about the development mailing list