3 ms·
A few things I like to do to avoid this: - read only connections / users in general - append _prod / _stage to the database name to avoid ambiguity (and ensur
by mnahkies 4y ago
A few things I like to do to avoid this:
- read only connections / users in general
- append _prod / _stage to the database name to avoid ambiguity (and ensure psql is configured to show the database name at the prompt)
- configure editors to color code sessions where possible (red for prod, amber for stage and green for dev/local)
- if a manual data modification is necessary, use a transaction and have commands prewritten to verify the intended outcome
In terms of underlying infrastructure I also very much appreciate deletion protection in terraform providers for any data stores, forcing a two phase destruction (one plan/apply to disable the protection and a second to actually destroy)