To change a field name while keeping its values, use Rename in Generator UI. Deleting a field and creating another does not count as renaming and can cause data loss.
Rename the field in the generator
Open Content → the desired entity → field. Save or cancel other edits in the editor first. Then:
- Click Rename and enter the new name.
- Click Preview rename. Check the new API name, database column name, and references to the field within the model.
- If the changes are correct, click Confirm rename.
After confirmation
- Open Generate → Preview changes.
- Check the files and rename migration.
- Run Generate.
- Adapt custom code and external clients that use the old API name.
- Apply migrations when updating the environment.
For example, you renamed Article.shortText to Article.summary. The generator remembers that this is the same field with a new name. The database column is renamed later, when you apply the generated migration. For production, follow the update process, which includes a backup.
Limitations
In the current version, Rename does not rename primary keys or physical relationship keys. If the preview shows a dependency blocking the action, resolve it first. Update references to the old name in custom code yourself: the generator does not edit your files.
If the connection is lost after confirmation, click Refresh field and check whether the new name was saved. Only then decide whether to repeat the action. If someone has changed the model in the meantime, reopen the preview.
All field settings are described in Field editor. Renaming is also available through CLI, with the same preliminary change analysis. Commands are listed in the CLI interface section.