Starts a new global database connection. Three scenarios are possible:
The database name
The database version, a version bump will trigger an upgrade
Optional
A list of migrations to be applied
Types.MigrationList: For more information on migrations
const initResp = await init('my-db', 1)if (initResp.upgraded) { console.log("Database was upgraded")} Copy
const initResp = await init('my-db', 1)if (initResp.upgraded) { console.log("Database was upgraded")}
Starts a new global database connection. Three scenarios are possible: