Skip to content

Correct syntax to run specific seed file #335

@romanstetsyk

Description

@romanstetsyk

My kysely.config.ts has the following option:

seeds: {
  seedFolder: "seeds",
},

I can create a seed file with the following command:

npx kysely seed make testseed

And I can successfully run all seeds with

npx kysely seed run

However, neither of the following commands works when I try to run a specific seed:

npx kysely seed run --specific testseed
npx kysely seed run --specific=testseed
npx kysely seed run --specific 1765585112853_testseed
npx kysely seed run --specific=1765585112853_testseed
npx kysely seed run --specific 1765585112853_testseed.ts
npx kysely seed run --specific=1765585112853_testseed.ts
npx kysely seed run --specific seeds/1765585112853_testseed.ts
npx kysely seed run --specific=seeds/1765585112853_testseed.ts
npx kysely seed run --specific ./seeds/1765585112853_testseed.ts
npx kysely seed run --specific=./seeds/1765585112853_testseed.ts

All of them log Starting seed run No seeds found.

My question is, how do I run a specific seed file?

P.S. I use "kysely-ctl": "0.19.0" and "kysely": "0.28.8".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions