Description
Unless we can think of any good reasons not to, we should probably add ondelete="CASCADE"
to the foreign key relationships for status
, persistence
, usage
, etc. the way we do with subscription_details
. Without this, you have to delete all of the related records before you can delete a record from accounting.subscriptions
.
This is probably not very important in production, since subscriptions won't be deleted often, if ever. However, it should make testing easier.
For the usage
table, we would add the ondelete
parameter here:
rctab-api/alembic/versions/b65796c99771_squash.py
Lines 441 to 444 in cef5746
as we do here:
rctab-api/alembic/versions/b65796c99771_squash.py
Lines 377 to 381 in cef5746