Function: migrate()
TypeScript 0.4.0 · Source commit cbff27b8a34e1384384018680e46c20d5c610cc9. Generated with reviewed comment corrections; see generation notes.
migrate(
pool):Promise<void>
Defined in: migrate.ts:54
Applies the embedded migrations the database has not applied yet, up to the latest embedded version. A database already at a newer version (migrated by a newer client) is left unchanged. Concurrent callers, in any client, are serialised by an advisory lock.
This is schema management, separate from Connection: run it once before connecting, e.g. at application start-up.
Parameters
pool
Pool
Returns
Promise<void>
Throws
DirtySchemaError when a previous migration failed partway.