I noticed that the user table has a field named data.

In this field the profile module serializes (and unserializes) optional extra fields.

I can't help wonder why the node table does not come out of the box with an unused field of type longtext (perhaps to be named data) to allow the persistance of additional fields via serialization.

If it did, it seems to me, that authors of custom modules with addition field data could, in many cases, simply use the node table and would not need to create their own tables. In many cases they would not even need setup sql.

This seems too simple to me... Am I missing something?

Comments

moshe weitzman’s picture

the data field in users table was an experiment which had mixed results. thus, we have not extended the concept to node table. serialization makes it hard to query, but easier for admins to try out new modules.