|
From: Kevin <ke...@dr...> - 2005-11-16 18:06:44
|
Hi, I've been working on cleaning up the database code and making it more easily portable to other RDBMSs. I started by converting it to use PEAR_DB. Athough I eliminated all the "mysql_" function calls, the queries and table structure is still very mysql specific. A couple of days ago I scraped my PEAR_DB work and started working with ADODB. I am *very* pleased with the results so far. I have it working fairly well on both mysql and postgresql. One of the nice features of ADODB is its support for handling database metadata an abstract (non-dbms specific) way. http://phplens.com/lens/adodb/docs-datadict.htm By using the $dict->ChangeTableSQL() method, It will either: create the table if it is missing, or alter the table to match the definition provided. This will make upgrading the database on an existing FoF/FoFR installatio= n quite easy. --- Kevin > From: Benjamin Stewart <bsii@cr...> > > One thing we need to come up with a solution for is how to handle changes > that require database changes. We need ways of knowing which features=20 require which database changes, so we know whether or not any given database > change needs to be included in an updater. This, by the way, is one of the > biggest problems I've never been able to solve really well in past lives. > > --Benjy --=20 Kevin |