Thursday, September 2, 2010

ForeignKey, Index conflict going from 1.0 to 1.2

Have a db that was generated under 1.0. Hence, foreign keys in MySQL
have been named [tablename]_[fieldname]_id.

However, when upgrading to 1.2, I tried to create an index on that
field and got an error, because 1.2 names its foreign keys
[tablename]_[hash] and its index keys [tablename]_[fieldname]_id.

Is there a solution for this? A script that renames the foreignkeys
to follow the 1.2 format, or a way to alternatively name the index
key?

Apologize if this is already documented somewhere. I looked all over
and didn't find anything.

Thanks,

Josh

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate