Welcome to the MongoDB Community!
Unfortunately there don’t appear to be a lot of users with experience using TypeORM with MongoDB, but it does look like you’ve asked in all of the right places to try to reach relevant audiences. Thanks for including the other links here – that will be useful for anyone else with a similar question.
I see that you have received at least one answer on your Stack Overflow question (although it looks like it took a
+50 bounty to encourage responses). It seems that TypeORM currently ignores creating migrations for MongoDB, and the suggestion was to use a standalone migration tool instead.
MongoDB does not have a fixed schema or catalog to reference, and there is no strict requirement for all documents in a collection to have identical schema. You can enforce optional schema validation on inserts and updates using JSON Schema validation, but changes in schema validation rules do not affecting existing documents.
For larger deployments flexible schema can have significant performance benefits: you can change schema (or schema validation rules) without immediately rewriting all of the historical documents. However, the onus of handling schema variations is then pushed down to your application code.
If your use case requires a strictly consistent schema for all documents, you can still create more traditional migration scripts. However, there is some potential flexibility in choosing how to migrate documents. For example, you could choose to migrate documents in batches (perhaps based on some criteria like newest to oldest created) in order to control the impact on your MongoDB deployment’s working set or performance.