Now we know that there is no DDL in MongoDB. However, is there a way to recapture/regenerate the "create collection" that was used to create an existing collection?
Say, there is a collection C1. How could we figure out (auto-generate?) the "create collection" command for this existing collection? Along with the indices and the collation used?
Aim is to duplicate the collection C1 on another MongoDB database.
Not only do we need the indices, we need the collation, the validators etc.