Ask HN: Why don't apps/websites have an undelete button?
Do we just not need an "undo" button? It's an interesting question. There's been previous posts around "soft-delete" and not needing it. Then again whey are there so many ORM's that do this? Why do we have time travel is databases? Well-implemented undo / undelete features are for regular, long-term, skin-in-the-game users, who are doing real work. Apps & web sites are generally (for the user) cheap, transient fluff for low-stakes stuff. You spend 30+ hours building your 2023 Departmental Planning Documents & Budget in (say) MS Word and MS Excel - which have real undo and recovery features. Not in some app or web site. Whenever I've implemented undo (or undelete) there's always been a horrible nagging feeling in my head of "What happens if there's a data breach before something gets hard deleted?" People will expect their deleted data to have been properly deleted. If they discover that it wasn't then regardless of how well I explain how undo features have to work there will always be some users who think I lied about the delete feature. It also makes things like GDPR and erasing people's data a little harder (although not much). Hard delete also frees resources immediately, which can save some money at scale. And, ultimately, most users don't expect it in a web app, so you can save time by not building it. True. Yet so many ORM's come with "soft-delete" built-in: - [Golang Bun](https://bun.uptrace.dev/guide/soft-deletes.html#introduction) Lightweight Golang ORM for PostgreSQL, MySQL, MSSQL, and SQLite - [Golang GORM](https://gorm.io/docs/delete.html#Soft-Delete) The fantastic ORM library for Golang - [Typescript DeepKit](https://docs.deepkit.io/english/database.html#_plugins) High performance typescript framework - [Java Spring](https://www.baeldung.com/spring-jpa-soft-delete) How to Implement a Soft Delete with Spring JPA - [Typescript TypeOrm](https://doug-martin.github.io/nestjs-query/docs/persistence/...) Easy CRUD for GraphQL - [Typescript Sequalize](https://sequelize.org/docs/v6/core-concepts/paranoid/) Sequelize is a modern TypeScript and Node.js ORM for Oracle, Postgres, MySQL, MariaDB, SQLite and SQL Server, and more. - [Typescript Prisma](https://www.prisma.io/docs/concepts/components/prisma-client...) Next-generation Node.js and TypeScript ORM - [Rust](https://docs.rs/diesel-softdelete/latest/diesel_softdelete/) Diesel query builder - [Python Django](https://github.com/scoursen/django-softdelete) Soft delete for Django ORM, with support for undelete GDPR is a good point. Also, do people really go back and delete?