[wp-hackers] Table updater wish

Matt Mullenweg m at mullenweg.com
Fri Jul 30 17:22:35 UTC 2004


Owen Winkler wrote:

> Can the input to the function be an array of query strings?  For
> example:

I think that would be less flexible. It doesn't need to be a function per 
se, but rather something to easily work with a nested array describing 
table structure. Sorta like:

$wp_tables = array(
$wpdb->posts => array( each of the columns...) ,
$wpdb->users => array (....) ,
...
);

This could be something that parses SQL dumps and extracts the info from 
there. But the idea is for it to be flexible enough that when we add a new 
column or index or something:

1. We only change one place in the code and it's in the install and upgrade
2. It won't add duplicates

-- 
Matt Mullenweg
  http://photomatt.net | http://wordpress.org
http://pingomatic.com | more soon...



More information about the hackers mailing list