Ticket #917 (closed defect: invalid)
Changing a required foreignkey to default=None and null=True results in requiring user input
|Reported by:||dpn||Owned by:||andrew|
user = models.ForeignKey(User)
user = models.ForeignKey(User, null=True, default=None)
I get the following error:
? The field 'SuggestedBrand.user' does not have a default specified, yet is NOT NULL. ? Since you are making this field nullable, you MUST specify a default ? value to use for existing rows. Would you like to: ? 1. Quit now, and add a default to the field in models.py ? 2. Specify a one-off value to use for existing columns now ? 3. Disable the backwards migration by raising an exception.
Am I doing it wrong?
Note: See TracTickets for help on using tickets.