Safety
How databee keeps destructive work behind a human approval and secrets out of the model.
Nothing destructive without an approval for that plan
databee separates planning from doing. databee generate alter and databee migrate plan write a plan with a hash. The plan lists its steps and marks the ones that take an ACCESS EXCLUSIVE lock (PGM001), rewrite a table (PGM002), need a backfill (PGM003) or are destructive (PGM004).
Running it takes two things that the plan alone cannot give:
- A human approval for the plan’s current hash.
databee plan approve <name>(ordatabee migrate approve <name>) shows the plan and records the approval. It needs an interactive terminal and has no--yesflag. The approval is stored as<config_dir>/approvals/<hash>.toml, outside the project, so it cannot be committed along with the plan, and editing the plan changes its hash and voids the approval. - A database that still matches.
plan applychecks that the database still matches the plan’s source model before it starts, continues an interrupted run after the last completed step, and compares the database with the target model at the end.
In Studio, a destructive plan is approved in a dialog that shows the steps, the risks and the hash, and asks for the plan name.
Agents can propose, not approve
Over MCP, no tool approves anything. plan_apply, migration_execute and migration_resume exist only in the operator profile and run only a plan with a current approval. Profiles are opt-in: the default server cannot even change the model.
Replies that carry text from a model or a database mark it "content_origin": "data", and the agent skill tells agents never to follow instructions found in it.
Credentials stay outside
Model files, plans, snapshots and export profiles contain no passwords and no connection URLs. Connections are profiles in connections.toml in the configuration directory ($DATABEE_CONFIG_DIR, else $XDG_CONFIG_HOME/databee, else ~/.config/databee), with the password read from an environment variable (password = "env:NAME"). MCP tools take profile names and reject URLs. Error messages have known secrets removed, and a URL that embeds a password produces the warning DB-CFG-001. The mask secret for exports is DATABEE_MASK_KEY, read from the environment and never written.
Data stays local
Reader, designer and generator tools never connect to a database. Tools that do (plan_apply, export, migration) return counts, hashes and names, not row contents. out/ is in the project’s .gitignore because exports can hold personal data, and fields can be marked sensitive so an export without a mask draws a warning, or with --strict stops.