Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "services/migration/migration"

Index

Variables

Const migrationId

migrationId: string = nanoid()

Migration Unique ID

Functions

Const isExecuted

  • isExecuted(__namedParameters: { db: Db; filename: string }): Promise<boolean>
  • Check if a file was executed in past

    Parameters

    • __namedParameters: { db: Db; filename: string }
      • db: Db
      • filename: string

    Returns Promise<boolean>

Const markAsExecuted

  • markAsExecuted(__namedParameters: { db: Db; description: null | string; failMessage: undefined | string; filename: string; logs: LogEvent[] }): Promise<void>
  • Mark a migration file was processed

    Parameters

    • __namedParameters: { db: Db; description: null | string; failMessage: undefined | string; filename: string; logs: LogEvent[] }
      • db: Db
      • description: null | string
      • failMessage: undefined | string
      • filename: string
      • logs: LogEvent[]

    Returns Promise<void>

Const startMigration

  • startMigration(__namedParameters: { migrationPath: string }): Promise<void>

Object literals

Const LogLevel

LogLevel: object

Predefined LogLevel

debug

debug: string = "debug"

error

error: string = "error"

normal

normal: string = "normal"

silly

silly: string = "silly"

warn

warn: string = "warn"

Generated using TypeDoc