Now that the MCP server is out, a growing share of schema edits will come from AI agents hitting the CMA directly rather than from a person working through the environment + migration flow. I’d like a way to track and revert schema changes at the project level to keep that safe.
I’m aware of what already exists: sandbox environments with fork/promote, migrations:new --autogenerate to diff two environments and scaffold a script, migrations:run, schema:generate, and the Schema Import/Export plugin. Those work well for a deliberate, human-driven workflow where you fork an environment, make changes, and write or generate a script.
The gap I keep hitting is that this assumes a second environment to diff against and a script to author. Agents tend to make many small direct edits inside a single environment, and there’s no lightweight record of how the schema looked at successive points in time that I can inspect or restore. To roll back today I either fork an older environment or hand-write a reverse migration.
What I’d love, per project:
-
automatic versioning or snapshots of the schema only (models, fields, validators, appearance, settings), not content
-
a diff between any two points in that history, so I can see exactly what an agent changed
-
a one-step rollback of the schema to a previous version
I understand that reverting a schema also has content implications, since fields and models carry data. In my experience that concern is smallest during the build phase, where schema churn is high and real content often isn’t in place yet, and that’s exactly where this would be most useful. It could be opt-in or scoped to schema with a clear warning about what it does to existing records.