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
Landy Chapman
unread,
Aug 19, 2011, 11:53:38 AM8/19/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
thanks for the links. I did come across those issues as well. But
the
main issue is that no SET NULL contraint is being set on the
database ... Django does do it, but
if someone deletes an item using the cli, the database will not do the
right thing since
the sql being generated ignores the SET NULL constraint.