How to Configure Make CockroachDB Prevent Delete

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up a make cockroachdb prevent delete workflow, restrict the database role permissions. You must revoke row removal rights from the user account that Make uses. Many teams connect Make to CockroachDB using a default admin account for speed. This broad role lets a broken workflow wipe out whole production tables in seconds. Scoping down the database role stops bad automation modules from erasing live records. How to set up a make cockroachdb prevent delete role CockroachDB controls data

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

To set up a make cockroachdb prevent delete workflow, restrict the database role permissions. You must revoke row removal rights from the user account that Make uses. Many teams connect Make to CockroachDB using a default admin account for speed. This broad role lets a broken workflow wipe out whole production tables in seconds. Scoping down the database role stops bad automation modules from erasing live records.

How to set up a make cockroachdb prevent delete role

CockroachDB controls data changes through role-based permissions at the database and table levels. Make connects to your cluster using standard Postgres wire protocol settings and user credentials. To block row removal, you create a dedicated database user just for Make. You then grant this user read, insert, and update rights on target tables. You leave out the delete privilege when you assign permissions to this role.

You also need to check default grants on the public schema in CockroachDB. New tables often inherit broad permissions if you do not lock down defaults. When Make runs a scenario, it logs in with this restricted user role. If a module tries to run a delete statement, CockroachDB blocks the action. The database returns a permission error to Make, and your table rows stay safe.

How to handle soft deletes in Make scenarios

Sometimes a Make workflow still needs to mark old records as inactive or removed. Since the database role blocks hard deletes, your team can use soft deletes instead. You add a status column or a timestamp column to your CockroachDB table. Make then sends an update query instead of a delete command during runs.

This simple pattern fits well with a restricted database role in CockroachDB. The Make user only needs read and update permissions to flag dead rows. Your live apps can filter out these flagged rows when they read data. If a Make scenario misfires, you can restore the flagged rows with an update. You do not have to pull data back from a slow cluster backup.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native role grants solve and where gaps remain

Native CockroachDB roles stop an account from running delete commands across a table. This setup decides who logs in and which broad command types they can run. Still, static database grants cannot inspect what individual statements do in flight. A Make workflow with update rights can still overwrite every row by mistake.

If an update query misses a filter clause, it can blank out customer emails. Static roles also do not rewrite sensitive fields like phone numbers or card numbers. Every Make module using that connection shares the same flat database privileges all day. Teams also lack a unified audit log linking Make runs to specific queries. You need statement-level controls to inspect queries and mask data before execution.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Can Make connect to CockroachDB using the Postgres app module?

Yes, CockroachDB supports the standard Postgres wire protocol for client connections. You can use the standard Postgres module in Make to run your queries.

What happens in Make when CockroachDB blocks a delete query?

CockroachDB returns a permission denied error to the active Make scenario right away. Make stops that module step and triggers your error handler if one exists.

Does blocking delete rights also stop table drops in CockroachDB?

No, dropping a table uses a separate permission from deleting rows in CockroachDB. Make sure your automation role does not own the table or have drop rights.

The query runs. The emails stay hidden.