11 May
2006
11 May
'06
9:41 p.m.
On Thu, 11 May 2006 20:31:32 +0200, Adrian Rossouw <adrian@bryght.com> wrote:
Now that we have .install files for modules, I believe it is time we extended our database abstraction layer.
I recommend we create the following extra functions :
1. db_create_table($tablename, $columns); // columns is an associative array with the 'name' => 'type'
Why 'name' => 'type'? I'd think that 'name' => 'foo', 'type' => 'foo', 'default' => 0, and so on would be a beter way to capture all the extra stuff necessary. Chx makes a good point, though, that data column types differing between implementations is one of the ugly bits. It'd be odd to set up our own 'drupal-esque' data types and map them to db specific types in the function. --Jeff