Add --seeds-directory option
See original GitHub issueEnvironment
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:
- Created 4 years ago
- Comments:5
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
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!