[development] Form field maxlengths vs. database field sizes

Adrian Rossouw adrian at bryght.com
Thu Feb 9 19:23:07 UTC 2006

On 08 Feb 2006, at 8:28 PM, Chris Johnson wrote:
> It does not presently, but Drupal could know the field sizes in the  
> database tables.  However, is that worth doing?  (I'm presently  
> developing a database abstraction layer for my employer where the  
> db layer figures out the metadata, like field sizes, on the fly so  
> that the applications need not know anything at all about it.)

I want to do this for 4.8.

it simplifies the install files (which are in core now), and allows  
us to possibly automate some of the _update_x function creation.

db_create_table('name', array('field' => 'type', 'field' => 'type');

keeping track of all the columns in the database is important for  
stuff like views and relationships too.

Adrian Rossouw
Drupal developer and Bryght Guy
http://drupal.org | http://bryght.com

More information about the development mailing list