1

I'm a newbie in mongoDB, and I just would like to ask a simple question. In creating tables in MongoDB, do you go ahead in MongoDB compass and create the fields in a collection, or is there a command where you can generate the table fields declared in the model just like Laravel's php artisan migrate?

1 Answers1

1

You can set up schema validation to enforce what field names are permitted/required, see https://docs.mongodb.com/manual/core/schema-validation/#schema-validation

Joe
  • 558
  • 3
  • 4