Constructors MethodsOptional
after Up Success afterUpSuccess () : unknown Returns unknown create Collection createCollection ( collectionName : string ) : void Returns void create Collections createCollections ( collectionNames : string [] ) : void Parameters collectionNames : string [] Returns void create Index createIndex ( collectionName : string , index : IndexSpecification , options ?: Omit < CreateIndexesOptions , "session" > , ) : void Parameters collectionName : string index : IndexSpecification Optional
options : Omit < CreateIndexesOptions , "session" > Returns void defer defer ( callback : ( db : Db , client : ClientSession ) => Promise < void > ) : void Parameters callback : ( db : Db , client : ClientSession ) => Promise < void > Returns void drop Collection dropCollection ( collectionName : string ) : void Returns void drop Index dropIndex ( collectionName : string , indexName : string , options ?: Omit < CommandOperationOptions , "session" > , ) : void Parameters collectionName : string indexName : string Optional
options : Omit < CommandOperationOptions , "session" > Returns void exec Up execUp ( session : ClientSession ) : Promise < void > Returns Promise < void >
Drop a collection. This operation will be done last in the migration. It cannot be run in a transaction, so we recommend doing it in a separate migration file.