Finalize the schema

Review the collections, set the data type of each field, and export a MongoDB validator.

  • The default type for each field is string. Select a field and click Type to tick one or more types: string, int, double, bool, date, object, array. Then click submit.
  • Move → Up / Down changes the field order.
  • The JSON SCHEMA panel updates with every change.

In the Export menu, SCRIPT downloads a command for mongosh or MongoDB Atlas. Replace the database and collection names before running it:

use dbName
db.createCollection( "<collection_name>", { validator: { …JSON Schema… } })

Edit ER returns to the design stage.