lundi 17 mai 2021

deleting records on Prod through Admin GUI vs CLI vs Code

This will probably be subjective, but just wondering what the desired way of deleting records on a production DB would be (assuming you do not want to soft-delete archive and actually purge it)

I'm just trying to delete a couple of records (as opposed to a bulk cleanup). In this case, I don't see anything wrong with using some kind of Admin GUI tool and removing the items this way.

A similar option is to go into the CLI for the DB and do it there too. In my opinion, the caveat here is that you can accidentally delete all records by forgetting to include a where clause. Doing so in a GUI would prevent this.

Another option is to write some script and do it that way too. But, since this is automated, you may realize there's a problem after it's too late.

No matter what, I understand the need to backup often and prior to doing anything on Prod DB too.

Any insights? Thanks!

Aucun commentaire:

Enregistrer un commentaire