Custom logic to initialize the database in addition to TypeORM synchronization.

Hierarchy

  • DbInitializer

Properties

name: string

The name used to identify the initializer in logs.

order?: number

The execution order of initializers. This applies for both methods. The default is 0.

Methods

  • Executed after TypeORM does its sychronization.

    Parameters

    • dataSource: DataSource

    Returns AsyncOrSync<void>

  • Executed before TypeORM does its sychronization.

    Parameters

    • dataSource: DataSource

      It has TypeORM synchorinize disabled and it is already initialized so that you can use it directly.

    Returns AsyncOrSync<void>

Generated using TypeDoc