Skip to content

MySQL Incompatibility: unique_together constraint on BLOB #14

@matthewwithanm

Description

@matthewwithanm

The Post model contains a unique_together constraint with includes the (BLOB) guid field, making it MySQL incompatible. Running syncdb results in the following error:

_mysql_exceptions.OperationalError: (1170, "BLOB/TEXT column 'text' used in key specification without a key length")

I was going to submit a patch, but I'm not sure how you want to handle this. Clearly, the easiest thing would be to just remove the constraint, however another option is to store a hash of the guid and use that for the unique_together tuple instead.

Here's some more information about this particular limitation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions