# Should I avoid the DELETE if I will use it as RAW SQL

**URL:** <https://forum.djangoproject.com/t/should-i-avoid-the-delete-if-i-will-use-it-as-raw-sql/44658>\
**Category:** Using the ORM\
**Created:** [March 23, 2026, 4:04pm UTC](https://forum.djangoproject.com/t/should-i-avoid-the-delete-if-i-will-use-it-as-raw-sql/44658 "2026-03-23T16:04:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yousefmo768](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/yousefmo768/32/31820_2.png) [@yousefmo768](https://forum.djangoproject.com/u/yousefmo768)\
**Post date:** [March 23, 2026, 4:04pm UTC](https://forum.djangoproject.com/t/should-i-avoid-the-delete-if-i-will-use-it-as-raw-sql/44658/1 "2026-03-23T16:04:29Z")

</div>

I looked at the database scheme and noticed that the on delete `CASCADE` is not implemented on the database level

So I think that If I use raw sql `DELETE` it wil not follow the on delete `CASCADE` condition.

So should we avoid that ?

what will you do it you need that (maybe a complex `WHERE`statement idk) ?

Is it mentioned in the documentation that adding `CASCADE` manually in the database level is legal ?

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [March 23, 2026, 4:20pm UTC](https://forum.djangoproject.com/t/should-i-avoid-the-delete-if-i-will-use-it-as-raw-sql/44658/2 "2026-03-23T16:20:57Z")

</div>

> [@yousefmo768](#):
>
> noticed that the on delete `CASCADE` is not implemented on the database level

It’s coming. See:

- [Django 6.1 release notes - UNDER DEVELOPMENT | Django documentation | Django](https://docs.djangoproject.com/en/dev/releases/6.1/#database-level-delete-options-for-foreignkey-on-delete)  
For historical context, also see:
- [#21961 (Add support for database-level cascading options) – Django](https://code.djangoproject.com/ticket/21961)
- [Client Challenge](https://pypi.org/project/django-db-cascade-2/)

> [@yousefmo768](#):
>
> So should we avoid that ?

Yes. In general terms you should avoid using raw sql in any situation where the appropriate ORM functionality is provided.

> [@yousefmo768](#):
>
> Is it mentioned in the documentation that adding `CASCADE` manually in the database level is legal ?

See the docs for [DO\_NOTHING](https://docs.djangoproject.com/en/6.0/ref/models/fields/#django.db.models.DO_NOTHING).

In general terms, doing _anything_ directly to the database is “legal” - it just ends up being up-to-you to ensure that the database remains consistent and functional when accessing it using Django.
