Length for an index

Issue #2293 resolved
Former user created an issue

In MySQL is it possible to set a length for an index. This is possible for normal keys and composite keys.

Maybe it is possible to create a MySQL-Specific Index Option to set the length for an Index.

Example:

Index('my_index', my_table.c.value, mysql_length=10)

Result:

KEY `my_index` (`value`(10))

This option is especially useful in case you want to set an index on the first some characters of a blob/text without length.

Current workaround: Create a DDL

Comments (7)

  1. Mike Bayer repo owner
    • changed milestone to 0.7.3

    yes that looks great !! two great patches in a row! I'll try to get this committed later today.

  2. Log in to comment