prorm API Reference
    Preparing search index...

    Class SeederRunner

    SeederRunner manages the lifecycle of database seeders

    Hierarchy

    • EventEmitter
      • SeederRunner
    Index
    • Ensure the PrormData tracking table exists

      Returns Promise<void>

    • Return names of all seeders that have already been executed

      Returns Promise<string[]>

    • Run all pending seeders (or a single one, via options.only). Returns the names of seeders that were executed.

      Seeders are discovered in sorted filename order (see discoverSeederFiles) and run strictly one after another. If a seeder's up() throws, the error propagates immediately: seeders already recorded in this call remain recorded (their tracking rows were only inserted after up() resolved successfully), the failing seeder is NOT recorded as executed, and no further seeders in the batch are attempted. Re-running runSeeders() afterwards will retry the failed seeder and any that never got a chance to run.

      Parameters

      Returns Promise<string[]>

    • Undo a specific seeder, or the most recently executed one if no name given

      Parameters

      • OptionalseederName: string

      Returns Promise<void>

    • Undo all executed seeders in reverse order

      Returns Promise<void>