Simon Willison’s Weblog

Subscribe

Tuesday, 19th July 2022

Soft Deletion Probably Isn’t Worth It. Brandur argues that soft deletion—where you delete records by populating a “is_deleted” or “deleted_at” column in your table—isn’t worth the additional complexity and risk it adds to other database queries. Instead, he suggests having a separate deleted records table which records the deleted data in a JSON blob—allowing you to review and recover it manually if necessary, and giving you an easy way to expire deleted records that have exceeded your retention policy.

# 8:40 pm / databases, brandur-leach

2022 » July

MTWTFSS
    123
45678910
11121314151617
18192021222324
25262728293031