Safe mode: read-only and production guardrails
How RowDex protects production data: read-only connections, the production flag, confirmation for risky SQL, Redis and MongoDB commands, and guarded grid edits.
On this page
Most database disasters are small slips: a DELETE without a WHERE, a DROP in the wrong tab. RowDex gives each connection a safety mode so those slips are caught before they run.
Screenshot placeholder
A confirmation dialog titled Save changes to production listing the UPDATE statements that are about to run.
public/docs/safe-mode-confirm.pngTwo flags, set per connection#
Both are checkboxes in the connection form:
| Flag | Effect |
|---|---|
| Read-only mode | The connection refuses anything that changes data. Grid edits, inserts and deletes are blocked, and the session itself is read-only. |
| Mark as production database | Risky statements and grid writes show exactly what is about to run and need your confirmation. |
What counts as risky#
SQL#
| Statement | Risk |
|---|---|
INSERT, UPDATE, DELETE, REPLACE | Medium: a data write. |
CREATE, ALTER | Medium: a schema change. |
DROP, TRUNCATE | High: permanently removes objects or rows. |
DELETE or UPDATE with no WHERE | High: affects every row. |
Redis#
- High:
FLUSHALL,FLUSHDBandKEYS *. - Medium:
DEL,HDEL,LREM,SREM,ZREM,RENAME,EXPIREandPERSIST.
MongoDB#
- High:
deleteManyorupdateManywith an empty filter, and aggregation stages$outand$mergethat write to another collection. - Medium: any other write method such as
insertOneorupdateOne.
What you see#
When a flagged statement is about to run on a production or read-only connection, RowDex pauses, lists the reasons it was flagged, for example DELETE without WHERE can remove all rows, and asks you to confirm. Nothing runs until you do.
Grid edits are guarded too#
Saving cell edits, inserting rows, deleting rows and restoring deleted rows from the results grid get the same treatment. On production you see the actual statements, up to the first several, and confirm before they run.
Try changes safely#
- Use Begin and Rollback in the editor to run a write, check the result, and undo it. See Query editor.
- Run
EXPLAINinstead of the query to see what it would do, without executing it. See Explain plans.
Was this page helpful?