On 10/4/06, Greg Plesur <[EMAIL PROTECTED]> wrote:
>
> All,
>
> Do any of you know if there's a way to tell Django to specify "on
cascade delete" for foreign key references, when it creates DB tables?

I don't believe you can. However, you can use sql or sqlall [1] to
output the table creation sql to a file for editing.  For example:

manage.py sqlall myapp > myapp.sql

Then open myapp.sql in your favorite editor and alter the sql as you
see fit. After saving, feed that file into your db.

[1]: 
http://www.djangoproject.com/documentation/django_admin/#sql-appname-appname
>
> I'm developing an application that is mostly using Django to touch my
> DB, but that defines some SQL stored-procedures for manipulation of some
> of its data by other clients.  I'd like the db-level "on cascade delete"
> defined for these cases.
>
> Thanks,
> Greg
>
>
> >
>


-- 
----
Waylan Limberg
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to