Rollback DB changes through the UI - requesting advice
-
Hi I've an application with an admin section, for example a dropdown list is poopulated with cities but if the user was to delete some records through the UI, verify their actions in the dropdown and then decided they wanted to undo their change. What would be the best way to enable rollback functionality like this?
-
Hi I've an application with an admin section, for example a dropdown list is poopulated with cities but if the user was to delete some records through the UI, verify their actions in the dropdown and then decided they wanted to undo their change. What would be the best way to enable rollback functionality like this?
Set a boolean field [deleted] for each entity you want to rollback. Instead of actually deleting the records, you can just set deleted=true and then, if you want to rollback, set it to false again. Of course you need to consider the deleted field in your select queries.
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.