Let the agent propose the migration, not authorize the data risk
A coding agent can turn a schema request into plausible SQL in seconds. It cannot decide whether losing customer history is acceptable, whether an outage window fits the business, or whether an older application still depends on a column. That distinction matters as AI-assisted development moves beyond editing files into proposing changes to persistent data. The productive division of work is clear: agents accelerate preparation; named humans retain authority over consequential database changes.
A November 12 announcement from JillionDB makes this boundary concrete. The company describes a review step in which an MCP-connected coding agent proposes schema changes, a person inspects their risks, and the agent receives the migration only after approval. This is a vendor description, not an independent security assessment. Its useful contribution is the workflow question it raises: what exactly must a person approve before generated SQL reaches production?
What the announcement actually promises
According to its launch statement, JillionDB presents proposed changes on a schema canvas, labels steps as safe, caution, or destructive, and returns forward and rollback SQL after approval. It names PostgreSQL, MySQL, and SQLite as supported databases. Crucially, the company says its service never executes SQL against customer databases. Application remains the responsibility of the team's own tools. An approved proposal and an authorized production deployment are therefore separate events.
The announcement also introduces a bridge that compares the actual database schema with the reviewed schema, with an option to fail a build on drift. That is relevant because a reviewed plan can become stale. But neither a visual warning nor a drift check proves operational safety. Teams still need to assess actual permissions, engine-specific behavior, migration sequencing, realistic load, and recovery. The controls below are practical recommendations, not claims that this product implements every safeguard.
A schema diff is not the whole change
Consider an illustrative request: rename a customer's display-name field. A generator might emit a real rename, or drop the old column and add another. Those operations can look similar in a high-level summary while having radically different consequences. PostgreSQL's table-modification documentation explicitly states that dropping a column removes its data. Recreating a column with the same type does not reconstruct the values that were stored there.
Even a genuine rename can break deployed code that still uses the old name. Background workers, reports, exports, and integrations may lag behind the main service. A reviewer needs a dependency map, not merely syntactically valid SQL. Likewise, changing a default does not necessarily change existing rows: PostgreSQL documents that a new column default affects future inserts, not previously stored values. The intended business outcome must be checked against the exact operation.
Type changes and new constraints require equally specific reasoning. Do existing values fit? Can nulls be resolved without inventing business information? Will the operation wait for a lock or rewrite substantial data on this database version? Engine behavior varies, so avoid universal promises such as “this migration is instant” or “the rollback is automatic.” The agent can investigate these questions, but uncertainty must remain visible to the person making the decision.
Give the agent a factual, bounded assignment
A useful delegation package starts with the actual schema, the database engine and version, relevant application contracts, and an inventory of consumers. Add approximate table sizes, write patterns, sensitive fields, and operational constraints. Share only what the task requires. Schema names and relationships can themselves reveal confidential business structure; a schema-only export is not automatically harmless just because it contains no customer rows.
Ask the agent for alternatives and assumptions rather than a single confident script. Its response should distinguish schema changes, data transformation, application rollout, and cleanup. Require an explanation of compatibility between successive states. If representative data is needed, prefer approved synthetic or properly de-identified fixtures. Do not hand an assistant production credentials merely because it needs to understand a production-shaped problem.
- State the intended business behavior and what must remain unchanged.
- Identify affected tables, applications, jobs, and external consumers.
- Require explicit preconditions, abort conditions, and recovery limits.
- Separate optional cleanup from the minimum change needed to ship.
Review a sequence, not one heroic transaction
For many live systems, an expand-and-contract approach is easier to govern than a single destructive switch. First introduce a compatible structure. Then deploy application behavior that can coexist with old and new states. Backfill existing records in controlled batches where necessary, validate the result, and move readers or writers deliberately. Only later consider removing the obsolete structure. This is a pattern to evaluate, not a universal recipe for every engine.
For the display-name example, that might mean adding a new field while keeping the old one, defining a temporary consistency strategy, migrating existing values, and monitoring which consumers still use the legacy field. Dual writing introduces its own failure modes and must be designed carefully. The important point is not to mandate dual writes everywhere. It is to make the transition explicit enough that a reviewer can identify unsafe intermediate states.
Each stage should have an owner and a completion test. A backfill finishing successfully does not automatically authorize deletion. Destructive cleanup should be a separate reviewed change after the compatibility window has closed. Agents are helpful at preparing scripts and dependency searches, but should not infer that “the feature works” means “all historical consumers have disappeared.” Absence of a search result is not a complete inventory.
Bind approval to the exact artifact and environment
A human approval is meaningful only if it identifies what will run. Record the migration artifact, its version or digest, the target environment, relevant execution settings, and the evidence reviewed. If the SQL changes after approval, the old approval must not silently authorize the new script. The same applies when a retry targets a different database or a schema has drifted since rehearsal.
Separate proposal credentials from execution credentials. An agent that can create a pull request need not be able to apply DDL in production. A deployment service can execute an approved artifact through a narrowly scoped role without allowing the agent to alter the approval policy. Protect the migration pipeline, its required checks, and its secrets from being modified by the same untrusted proposal they are meant to assess.
This is where human control becomes technical rather than rhetorical. A prompt that says “ask first” is helpful guidance, but it is not an authorization boundary. A protected deployment environment, restricted database role, and independently enforced approval step can remain effective when an assistant misunderstands its instructions. Emergency access should also be explicit, limited, and logged rather than hidden behind a general-purpose administrator credential.
Rehearse with evidence that resembles production
A migration that passes on an empty development database may fail under real concurrency or data volume. Rehearse on an authorized environment with representative schema, data distribution, and workload. Record the engine version, starting state, run duration, observed blocking, resource consumption, and validation results. If production data is copied, access controls and privacy obligations still apply; rehearsal is not a reason to broaden exposure.
Test both the expected path and failure handling. What happens if a batch stops halfway through? Can it resume without duplicating or skipping records? Does application code tolerate an incomplete transition? Which timeouts stop unsafe waiting, and what state remains afterward? Do not assume every database operation can be enclosed in a universally reversible transaction. Check the exact statements and execution framework for the target engine.
Prefer validation tied to business invariants over a bare success exit code. Counts may be useful, but equal row counts do not prove that values were preserved correctly. Depending on the change, verify relationships, representative records, aggregates, uniqueness, null rates, and application behavior. The agent can assemble a verification report; the reviewer should distinguish observed results from predictions and explicitly list what was not tested.
A down migration is not a recovery plan
Generated rollback SQL is convenient, but its existence does not establish reversibility. A script can recreate a dropped column while leaving all its historical values lost. Reversing a lossy transformation may be impossible without another source of truth. Rolling back application code is a third operation, and may fail if the database has moved beyond what that version understands. These are different recovery problems.
PostgreSQL's documentation describes point-in-time recovery using a base backup and a continuous sequence of archived write-ahead log files. It also explains important boundaries: this approach restores an entire cluster, not an arbitrary subset, and configuration files need separate backup arrangements. The operational lesson is that “we have backups” is incomplete. Teams need evidence that the required backup chain exists and that restoration actually works.
Before release, agree on recovery objectives, who can authorize restoration, and how writes will be handled during an incident. A restore may require downtime and reconciliation of later legitimate activity. A forward fix may sometimes be safer than undoing a completed change. Humans must choose between those trade-offs; an agent should present options and evidence, not silently decide which customer updates are expendable.
Make the human decision short, specific, and actionable
Keeping a person in command does not mean asking them to read an endless transcript. Give the approver a compact packet: intended behavior, exact artifact, affected systems, compatibility sequence, rehearsal results, unresolved risks, recovery evidence, and proposed execution window. Link the detailed logs. Clearly separate the implementer's recommendation from the release owner's authorization. One person may hold both roles in a small team, but the decisions should remain distinguishable.
At execution time, monitor agreed stop conditions such as unacceptable blocking, error rates, or invariant failures. If the observed state differs from the approved assumptions, pause and escalate rather than asking the agent to improvise a destructive repair. Record what actually ran and verify the resulting application behavior. Completion means the system is in the intended state, not merely that a migration tool printed success.
Keep the leverage, keep the responsibility
The November announcement is useful because it puts a visible pause between an agent's proposal and a database change. That pause becomes valuable only when the person has the right evidence and the execution path respects the decision. Product labels, generated explanations, and rollback files are inputs to judgment, not substitutes for it. No specific interface removes the need to understand the database and the business it supports.
For software teams, the practical rule is simple: delegate drafting, comparison, test preparation, and documentation aggressively; retain human authority over scope, irreversible effects, and production risk. Start with one migration workflow, make approvals artifact-specific, rehearse recovery, and improve the packet after each release. The best AI-assisted migration is not the one written fastest. It is the one whose consequences remain understandable, bounded, and owned.