After changing the model, update the application files. In Generator UI, open Generate → Preview changes. Review file changes, API routes, and access settings. Resolve errors or conflicts first, then click Generate.
After successful generation, the new code is in the project. The running server uses it after a restart or a new release.
When files and data change
| Action | What it changes |
|---|---|
| Finish / Save in the editor | Model definition |
| Preview changes | Applies nothing; shows upcoming changes |
| Generate | Writes source files and new migrations according to the plan |
| Applying migrations | Changes the database |
| Build + deploy | Builds and starts the selected application version |
If you change your mind about the model
Click Discard ungenerated changes to restore the model in .admingen/project.yaml to the last successful Generate. Before confirming, review the diff — the list of changes that will be discarded.
This restores only the model. Generated and custom files, SQL migration history, database contents, .env, and Git remain as they are. To restore an already deployed application, use the appropriate procedure: code rollback or data restore.
If a conflict is found
If you manually changed a generator-owned file, Generate may report a conflict. Move needed changes to the custom zone. Force overwrite allows a specific generated file to be overwritten, so use it only after checking what will be lost. It does not fix model errors or remove the need to assess the impact on data.
Sometimes files have already been written, but the interface could not show the result. Refresh the project state and check it first. A screen refresh error alone does not mean you should click Generate again.
Optional: CLI
The same actions are available in the terminal. Specify the generated project path; the admingen command must be available from the current directory:
admingen-cli --path /absolute/project plan
admingen-cli --path /absolute/project generate --dry-run
admingen-cli --path /absolute/project generate
For the complete interface guide, see Generate; for startup, make dev; for updating a Docker environment, release update.