DBMigrator.migrate()method
Bring the provider's storage into line with the given collection schemas.
migrate(...collections: Collections): Promise<void>
new DBMigrator<T>(provider: T)
| Param | Type | |
|---|---|---|
provider | T | The database provider whose storage this migrator updates. required |
| Return | |
|---|---|
DBMigrator<T> | Base class for database schema migrators that bring a provider's storage into line with a set of collection schemas. |
| Property | Type | |
|---|---|---|
.provider | T | 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.
migrate() for a specific backend (e.g. SQL via SQLMigrator).class MyMigrator extends DBMigrator { async migrate(...collections) { ... } }
await new MyMigrator(provider).migrate(users, posts);Bring the provider's storage into line with the given collection schemas.
migrate(...collections: Collections): Promise<void>