ZF-57: Zend_Db_Table functionality for working with table structure

Description

Some very usefull enhancements for Zend_Db.

Zend_Db functionality for working with table structure.

Possible interface: $table = new Table(); // extends Zend_Db_Table $schema = new Zend_Table_Schema($table); $schema->addField('fieldname', array('type' => 'VARCHAR', 'null' => true));

$schema->deleteField( title // field title in DB );

$schema->addField( title, // field title in DB 'VARCHAR', //type 255, // length null, // default value ... );

$schema->alterField( title, // field title in DB 'VARCHAR', //type 255, // length null, // default value ... );

Functionality for table structure import into DB and export to xml or other format would be very usefull too.

Possible interface: $schema->importStructure('table_structure.xml'); $schema->exportStructure('table_structure.xml');

Comments

This appears to be a duplicate of ZF-113, or vice versa.