ZF-5695: Zend_Db_Adapter_Pdo_Mysql->describeTable() does not return all information
describeTable() (via Zend_Db_Table_Abstract->info()) returns a lot of data from its underlying sql call to 'DESCRIBE ' but not all of it.
A significant omission is key information. Whilst Primary Key and Identity information is returned, Unique Key and Index key information is not, forcing the developer to do a second sql 'DESCRIBE ' in their own code to get the rest of the information.
Unfortunately as the Zend_Db_Table_Abstract->_setupMetadata() uses the output of the filtered describeTable() to cache the result, we can't simply reread the cache for the data and this becomes an expensive operation.
Can we have describeTable() return ALL the table information please? I suspect an argument against doing this is that ZF devs have elected to return the Least Common Denominator (LCD) data consistent across all adapter types. I would say that you should normalise the LCD data so it is consistent across all adapters but provide any extra info in an 'extras' parameter of the returned data set so that developers can take advantage of it where possible.