[support] Database : why the type fields are varchars

Morbus Iff morbus at disobey.com
Tue Apr 3 12:52:13 UTC 2007


>> We are going to build a web site using Drupal. I am new to Drupal CMS.
>> While going through the drupal tables, i found that the 'type' field
>> in 'node_type' table is varchar. I am eager to know - why the type
>> fields are varchars instead of integers.

Because node types are not integers? Node types are "page" and "story" 
and "asshat", not 1, 2 and 3. The modules you install (or the CCK node 
types you create) define the name of the node type and, since node types 
can come from everywhere, numbering them sequentially is not plausible.

-- 
Morbus Iff ( keep out of reach of children )
Technical: http://www.oreillynet.com/pub/au/779
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
aim: akaMorbus / skype: morbusiff / icq: 2927491 / jabber.org: morbus


More information about the support mailing list