Unique Id issue
Hi all,
Am in a bit of a fix which I put myself in,I have the following models:
class Town(...):
name = models.CharField(unique=true)
province = models.foreignKey(Province)
class Area(....):
name = models.CharField(unique=true,max_length=120)
town = models.CharField(Town)
The problem here is I made the assumption that an area name is unique,unfortunatly after deploying ,I have just realized that some towns have the same area names so I can't have example area x in town A as well as area x in town B.
We have already deployed and have 575 users so far,is there any safe way of removing the unique key constraint on Area model without damaging the records which are already there?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/pxRbdVnDVOwJ.
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