Skip to content

Comment on Avoiding the soft delete anti-patternparent

Comments

You want to disconnect it from fk constraints and schema because you don't want to manage schema evolution on deleted history.

If you keep it as mirrored schema you'll have to manage individual history table per table (high overhead), manage it on every migration and you'll run into problems sooner or later - you won't be able to migrate it correctly as historic records will be disconnected unlike ordinary ones.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.