Models don't work on MySQL

Bug #1018682 reported by François Marier on 2012-06-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Libravatar
Low
Unassigned

Bug Description

root@app1:/srv/libravatar/libravatar# python manage.py syncdb
Error: One or more models did not validate:
account.confirmedopenid: "openid": URLField cannot have a "max_length" greater than
255 when using "unique=True".

It looks like we'll have to limit OpenID URLs to 255 characters. Not ideal, but probably OK for the vast majority of them.

François Marier (fmarier) wrote :

15:35 < hellekin> fmarier: BTW the Django docs say that "Any fields that are stored with VARCHAR column
                  types have their max_length restricted to 255 characters if you are using unique=True
                  for the field."
15:36 < hellekin> and ComfirmedOpenId class says: openid = models.URLField(unique=True,
                  verify_exists=False, max_length=MAX_LENGTH_URL)
15:36 < hellekin> so it *will* be restricted to 255 chars anyway

François Marier (fmarier) wrote :

The Django OpenID library we use is also incompatible with MySQL for the same reasons (see bug #524796).

François Marier (fmarier) wrote :

I have just committed a fix for the field in ConfirmedOpenId. Not sure what we can do about the upstream bug though...

Changed in libravatar:
assignee: François Marier (fmarier) → nobody
status: Confirmed → Triaged
Changed in libravatar:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers