UNPKG

@mikro-orm/seeder

Version:

Seeder package for MikroORM.

9 lines (8 loc) 441 B
import type { Dictionary, EntityManager } from '@mikro-orm/core'; /** Base class for database seeders. Extend this class and implement `run()` to populate the database with data. */ export declare abstract class Seeder<T extends Dictionary = Dictionary> { abstract run(em: EntityManager, context?: T): void | Promise<void>; protected call(em: EntityManager, seeders: { new (): Seeder; }[], context?: T): Promise<void>; }