12.12.2012 8:55, ephan kirjoitti:
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 can remove it safely. Though you have to run some SQL script manually (or to use some migration tool like South) to remove it from the database(s).

--
Jani Tiainen

- Well planned is half done and a half done has been sufficient before...

--
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to