[development] (no subject)

Pierre Rineau pierre.rineau at makina-corpus.com
Mon Jul 12 16:33:35 UTC 2010

Le lundi 12 juillet 2010 à 09:19 -0700, nan wich a écrit :
> Is there an official stance on using hook_schema_alter to add columns
> to core tables? For example, we collect additional data on anonymous
> comments and want to actually save that data. Rather than creating
> another table (and subsequent JOINs), I'd just as soon stuff that data
> into the comments table, where it belongs. Should we ever disable
> comments (unlikely), we probably wouldn't mind losing that data too.
> Nancy E. Wichmann, PMP
> Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L.
> King, Jr.

I would say, create a new table instead of populating core one.

Each time you'll update your statistics, it will update the core
database row, which should have not been updated. It will break most of
the DBMS query cache, you will drastically lower your site performances
if you have a lot of data. Ever worst, some DBMS do important physical
row moves on each update (like PostgreSQL), this is no good, if you
don't have to update a row, don't update it.

You will may also experience some weird behaviors, like other modules
dropping rows and recreating them identically, then loosing your
statistics if they do not use drupal_write_record().


More information about the development mailing list