drop-cascade (GN015)#
Automatic fix is available.
What it does#
Checks for usage of cascade in drop statements.
Why not?#
Database schema should follow the principle of least surprise which says that every component in a system should behave in a way that most users expect it to behave, and therefore not surprise or astonish them.
Cascading drops should not cause unexpected loss of data. It is certainly dangerous if dropping a single table can wipe out half your database.
Are you certain you want cascade drop thus dropping every dependent objects?
When should you?#
Almost never.
Use instead:#
Remove the cascade or use restrict