DBMigratorclass

new DBMigrator<T>(provider: T)
ParamType
providerT
required
Return
DBMigrator<T>
Base class for database schema migrators that bring a provider's storage into line with a set of collection schemas.
PropertyType
.providerT
The database provider whose storage this migrator updates. required readonly

Base class for database schema migrators that bring a provider's storage into line with a set of collection schemas.

  • Subclasses implement migrate() for a specific backend (e.g. SQL via SQLMigrator).

Methods

Go

DBMigrator.migrate()method

Bring the provider's storage into line with the given collection schemas.

migrate(...collections: Collections): Promise<void>