No more soft delete¶
There was widespread agreement at the YVR summit not to soft-delete any more things. To codify this, we should remove the SoftDeleteMixin from NovaBase.
Soft deletion of rows imposes a management overhead to later delete or archive those rows. It has also proved less necessary than initially imagined. We would prefer additional soft-deletes were not added and so it does not make sense to automatically inherit the SoftDeleteMixin when inheriting from NovaBase.
As an operator, adding new soft deleted things means I need to extend my manual cleanup to cover those things. If I don’t, those tables will become very slow to query.
As a developer, I don’t want to tempt operators to read soft-deleted rows directly. That risks turning the DB schema into an unofficial API.
As a developer/DBA, providing deleted and deleted_at columns on tables which are not soft-deleted is confusing. One might also say it’s confusing to soft-delete from tables where deleted rows are never read.
This spec proposes removing the SoftDeleteMixin from NovaBase and re-adding it to all tables which currently inherit from NovaBase. The removal of SoftDeleteMixin from those tables which don’t need it will be left for future work.
We could not do this. This means we need an extra two columns on new tables and it makes it slightly easier to start soft-deleting new tables.
Data model impact¶
REST API impact¶
Other end user impact¶
Other deployer impact¶
- Primary assignee:
- Other contributors:
Remove SoftDeleteMixin from NovaBase.
Add it to all models which inherited from NovaBase.
Simplified and re-proposed