cakephp/cakephp — pull request #4897 by ravage84 (2014-10-16 15:03:48+00:00)
Title: 2.6 Add Support for MySQL Table Comments

Adds suppport for reading and writing table comments.

Example:
```` php
public $backups = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'),
// Some fields
'created' => array('type' => 'datetime', 'null' => true, 'default' => null),
'created_by' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => null),
'modified_by' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
// Table comment gets added at the end of tableParameters
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB', 'comment' => 'foo bar baz1')
);
````

Creating the table:
`````sql
CREATE TABLE `cakephp_test`.`backups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
/* some fields */
`created` datetime DEFAULT NULL,
`created_by` int(11) DEFAULT NULL,
`modified` datetime DEFAULT NULL,
`modified_by` int(11) DEFAULT NULL, PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8,
COLLATE=utf8_general_ci,
ENGINE=InnoDB,
COMMENT='foo bar baz1';
````

Altering the table:
```` sql
ALTER TABLE `cakephp_test`.`backups`
COMMENT='foo bar baz';
````

Altering the table when comment becomes empty string:
```` sql
ALTER TABLE `cakephp_test`.`backups`
COMMENT='';
````