Use Rename to change a name. It preserves the field's connection to existing data. Deleting an old field and adding a new one does not preserve that connection and serves a different purpose.
Rename a persisted field
First preview the result:
admingen-cli --path ./docs-demo field rename Article title --to heading --preview
Copy the manifest and lock revisions from the response. Then confirm exactly that version:
admingen-cli --path ./docs-demo field rename Article title --to heading --confirm \
--expected-manifest-revision '<ревизия manifest из preview>' \
--expected-lock-revision '<ревизия lock из preview>'
Replace angle-bracket text with real tokens from the preview. Both modes return JSON with revisions even with text output. If the model changed meanwhile, preview again: the old tokens no longer apply.
| Flag | Purpose |
|---|---|
--to NAME |
Required new technical name. |
--preview |
Calculate consequences only. |
--confirm |
Confirm the model change; mutually exclusive with preview. |
--expected-manifest-revision |
Manifest version reviewed by the user. |
--expected-lock-revision |
Lock version reviewed by the user. |
Confirmation changes the model. Then run plan, dry-run, Generate and the required migrations. Preview also shows whether that particular rename is supported. A regular field update --new-name does not replace Rename. The full entity field rename form is equivalent to field rename.
Delete a regular field
admingen-cli --path ./docs-demo field delete Article obsoleteNote --confirm-data-loss
For an already generated column, the flag confirms data loss when the DROP migration is subsequently applied. Saving the manifest alone does not delete database rows.
Protected identifiers and dependent fields cannot be arbitrarily replaced this way. If values must be retained, prepare their transfer through a custom migration first.
After the first successful generation, the storage type cannot change through --type or manual manifest editing. Create a new field, transfer values with explicit SQL, and only then plan deletion of the old field.
Delete an entity
admingen-cli --path ./docs-demo entity delete OldArticle --storage retain --archive-custom
| Flag | Action |
|---|---|
--storage retain |
Remove the entity from generation while preserving physical data. |
--storage drop |
Plan storage deletion; requires --confirm-data-loss. |
--archive-custom |
Archive retired custom sources outside compilation roots. |
--confirm-data-loss |
Explicitly confirm destruction of data when applying the migration. |
For a previously generated entity, choose storage explicitly. Dependencies and relationships can prevent deletion. Fix the model first; manually deleting files does not replace this check.
The custom archive preserves source files, not database data. Delete a virtual projection through projection delete NAME: it has no table of its own.
Review plan and diff after each change. Further instructions: custom migrations and custom code.