question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add --seeds-directory option

See original GitHub issue

Environment

Knex version: 0.17.5 Database + version: PG 10.5 OS: Mac OS 10.13.4

Feature discussion / request

It would be nice to have a --seeds-directory option, similar to --migrations-directory one. It’s useful when you don’t/can’t use knexfile but still want to generate seeds in specific directory.

yarn knex --seeds-directory src/server/seeds seed:make users

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
flaviosilveiracommented, Sep 11, 2021

I know this is an old one, but in the last versions we have --directory option.

Seeds CLI options

Looks like (at least for me, version ^0.20) override that config via command line is not working, I will try a PR in order to fix that

1reaction
candyapplecorncommented, Jul 16, 2019

I’ve just finished opening a pull request which may support this sort of functionality, albeit in a slightly different way: https://github.com/tgriesser/knex/pull/3357

It’d look like this:

yarn knex seed:make --subdirectory src/server/seeds users

I also added support for bundling the subdirectory with the seed’s name:

yarn knex seed:make src/server/seeds/users

If you can spare a minute, please give my pull request a quick review!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Seeds | dbt Developer Hub
To load a seed file in your dbt project: Add the file to your seeds directory, with a .csv file extension, e.g. seeds/country_codes.csv....
Read more >
CommandBox Migrations - ForgeBox
More managers can be added as new top-level keys: ... The seedsDirectory sets the default location for the seeder scripts. This setting is ......
Read more >
Database Seeding — CodeIgniter 4.2.11 documentation
Database seeding is a simple way to add data into your database. ... Seed files must be stored within the app/Database/Seeds directory.
Read more >
fireseeder - npm
Create seeds directory in your project root (where your package.json is created), and add your config inside package.json: "fireseeder": {.
Read more >
Database: Seeding - The PHP Framework For Web Artisans
All seed classes are stored in the database/seeds directory. ... As an example, let's modify the default DatabaseSeeder class and add a database...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found