You can modify your existing entity-relationship diagram in Compass to plan changes to your data model without affecting your actual data.
About this Task
In the Data Modeling tab, you can:
Add or remove fields
Change field data types
Rename fields
Note
Any changes you make to your entity-relationship diagram won't affect your actual database.
Before You Begin
You must have an existing diagram in Compass to modify the fields. To create a new diagram, see Generate an Entity-Relationship Diagram in Compass.
Steps
Add a New Field
To add a new field to a collection in your entity-relationship diagram:
Rename a Field
To rename a field in your entity-relationship diagram:
Change a Field's Data Type
To change the data type of a field in your entity-relationship diagram:
Select a new data type
In the Datatype drop-down menu, select the datatypes that you want to assign to the field. Because data in MongoDB has a flexible schema model, you can specify multiple data types for a field. If a field contains multiple data types, Compass labels the field as (mixed) in the diagram.
Remove a Field
To delete a field from your diagram: