[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seed --specific not working #3506

Open
NguyenTheSon opened this issue Oct 31, 2019 · 3 comments
Open

seed --specific not working #3506

NguyenTheSon opened this issue Oct 31, 2019 · 3 comments

Comments

@NguyenTheSon
Copy link

I ran the command 'knex seed: run --specific = filename.js'
command line error: error: unknown option `--specific'

@lorefnon
Copy link
Collaborator
lorefnon commented Nov 2, 2019

what is the version of knex you have installed (both global and local) ?

@kibertoad
Copy link
Collaborator

@NguyenTheSon Could you provide more info?

@strarsis
Copy link
strarsis commented Apr 9, 2022

+1, same issue. Using latest knex@1.0.5:

knex --version
Requiring external module ts-node/register
Knex CLI version: 1.0.5
Knex Local version: 1.0.5

When specifying more than one seed file using --specific (as stated in the documentation), the command fails with no seed files under those names being found:

knex seed:run --specific=default_categories.ts --specific=default_items.ts
Invalid argument provided: the specific seed "default_categories.ts,default_items.ts" does not exist.
Error: Invalid argument provided: the specific seed "default_categories.ts,default_items.ts" does not exist.
    at FsSeeds.getSeeds ([...]/node_modules/knex/lib/migrations/seed/sources/fs-seeds.js:47:15)
    at Seeder.run ([...]/node_modules/knex/lib/migrations/seed/Seeder.js:22:19)

It works when only one seed file is specified using --specific. Using more than one seed with --specific appears to cause KnexJS to use the joined string (,) of those seed file names/paths as a whole.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants