The traverser object that this migrator will use when traversing the collection and writing to documents.
A new BatchMigrator object.
Note that the TraversalConfig.batchSize config value must not exceed 500 for a traverser used in a BatchMigrator. This is because in Firestore, each write batch can write to a maximum of 500 documents.
InvalidConfigError Thrown if the traversal config of the specified traverser is not compatible with this migrator.
Creates a migrator that facilitates database migrations. The migrator creates a default traverser that it uses when traversing the collection and writing to documents. This migrator uses atomic batch writes when writing to docs so the entire operation will fail if a single write isn't successful.
A collection-like traversable group of documents.
Optional
traversalConfig: Partial<TraversalConfig>Optional. The traversal configuration with which the default traverser will be created.
A new BatchMigrator object.
Note that the TraversalConfig.batchSize config value must not exceed 500 for a traverser used in a BatchMigrator. This is because in Firestore, each write batch can write to a maximum of 500 documents.
InvalidConfigError Thrown if the specified traversalConfig
is invalid or incompatible with this migrator.
Generated using TypeDoc
Creates a migrator that facilitates database migrations. Accepts a custom traverser object as argument which the migrator will use when traversing the collection and writing to documents. This migrator uses atomic batch writes when writing to docs so the entire operation will fail if a single write isn't successful.