Document index requirement for cascading delete
Let's document that a foreign key constraint with a cascading delete requires a index on the column. If possible, let's also add a rubocop check for this.
There's a good explanation for the reasoning for this over in https://www.cybertec-postgresql.com/en/postgresql-indexes-and-foreign-keys/.
Here's two examples for this:
Edited by Andreas Brandl