Opened 19 years ago

Last modified 14 years ago

#1820 closed defect

Autogenerated ManyToMany fields can generate too long identifiers for mysql to handle — at Initial Version

Reported by: remco@… Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: normal Keywords: mysql
Cc: remco@…, crucialfelix@…, bronger@…, nabucosound@…, ville@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Having a model as part of an application called: front_booking:

class AccomodationUnit(Model):

Facility = ManyToManyField(Facility, verbose_name = 'faciliteiten')

Generates an "Identifier name is too long" exception when doing a syncdb on mysql 5.0.x. Mysql is only able to store identifiers of 64 bytes max.

_mysql_exceptions.OperationalError: (1059, "Identifier name 'AccomodationUnit_id_referencing_front_booking_accomodationunit_id' is too long")

Possible solution would be to allow a user to somehow influence the naming of these identifiers or use identifier names of 64 bytes max. in size

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top