Skip to content

Latest commit

 

History

History
30 lines (17 loc) · 885 Bytes

File metadata and controls

30 lines (17 loc) · 885 Bytes

elections-cpl.api.hscc.bdpa.orgDocs


elections-cpl.api.hscc.bdpa.org / lib/mongo-schema / initializeDb

Function: initializeDb()

initializeDb(__namedParameters): Promise<void>

Creates a database and initializes its collections. If the database does not exist before calling this function, it will be created first. This function should only be called on empty or brand new databases and not on databases with pre-existing collections.

Parameters

__namedParameters

__namedParameters.name: string

The name or alias of the database to initialize.

Returns

Promise<void>

Source

lib/mongo-schema/index.ts:283