When using the column type "longvarchar" with MySQL a column of the MySQL type "text" is created. Currently it is not possible to put an index on such a column as MySQL requrires a size parameter on such indexes that denotes how many bytes of the potential very big text column should be used for the index.
The attached patch fixes this bug by allowing a slightly enhanced syntax for defining indexes in YML files that gets used when translating it to a propel XML file.
In the following example a multi-column key is created that indexes both,
the "content" column (using the first 255 chars) and the author column:
propel:
blog_comment:
author: varchar(255)
content: longvarchar
_indexes:
idx1: [ { name: content, size: 255 }, author ]
The resulting XML file looks like this:
<index name="idx1">
<index-column name="content" size="255"/>
<index-column name="author"/>
</index>