Hi,
I really like the
Zend_Db_Schema_Manager(http://framework.zend.com/wiki/display/ZFPROP/Zend_Db_Schema_Manager+-+Rob+Allen)
proposal. It is especially the possibility of having the db schema in
versioncontrol in a backend neutral way. But as mentioned in the proposal
this requires some adapter functionality for each supported engine.
Stealing from rails; the following methods would properbly be needed:
createTable($name, $options);
dropTable($name);
renameTable($oldName, $newName);
addColumn($tableName, $columName, $type, $options);
renameColumn($tableName, $columnName, $newColumnName);
changeColumn($tableName, $columnName, $type, $options);
removeColumn($tableName, $columnName);
This would also require some cross-db datatypes like:
string, text, integer, float, datetime, timestamp, time, date, binary,
boolean
I think these methods would be a nice adition to the db adapters. The
describeTable method of the adapters already does some abstraction of schema
information, why not go all the way?
What do you think?
/Jacob
--
View this message in context:
http://www.nabble.com/Table-manipulation-in-Zend_Db_Adaptor-tf2823225s16154.html#a7880343
Sent from the Zend DB mailing list archive at Nabble.com.
|