I can get the set null on a foreign key to work.
in my model I have this:
leaguteTypeId = models.ForeignKey(LeagueType,null=True,
db_column='leaguetype', on_delete=models.SET_NULL)
This is what is postgresql dumps:
ALTER TABLE ONLY league
ADD CONSTRAINT league_leaguetype_fkey
FOREIGN KEY (leaguetype) REFERENCES leaguetype(id) DEFERRABLE
INITIALLY DEFERRED;
This is what it should be:
ALTER TABLE League
ADD CONSTRAINT league_leaguetype_fkey
FOREIGN KEY (leaguetype) REFERENCES leaguetype (id)
ON UPDATE CASCADE
ON DELETE SET NULL
django version 1.3 postgresql 8.4
any ideas ?
thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.