Function mongodm::sync_indexes
source · pub async fn sync_indexes<CollConf: CollectionConfig>(
db: &Database
) -> Result<(), Error>
Expand description
Synchronize backend mongo collection for a given CollectionConfig
.
This should be called once per CollectionConfig
on startup to synchronize indexes.
Indexes found in the backend and not defined in the model are destroyed except for the special index “_id”.