3 ms·
Author here. You are right, the main downside of the approach in the article is that you have to remember to filter the deleted_at column on constraints and co
by josevalim 2y ago
Author here.
You are right, the main downside of the approach in the article is that you have to remember to filter the deleted_at column on constraints and consider how foreign keys cascade.
About triggers, we do link at the bottom to an article that uses them: https://brandur.org/fragments/deleted-record-insert https://brandur.org/fragments/deleted-record-insert
Since I am exploring a sync engine, having a separate table for deletes means I’d need to run additional queries when catching up, which led me to explore the single table approach. Let’s see how it evolves.