Skip to content

Commit

Permalink
Add array of paths and sortDirsSeparately for seeds (#282)
Browse files Browse the repository at this point in the history
related to knex/knex#3967 and #220
  • Loading branch information
mdartic authored Aug 9, 2020
1 parent 98c9bb9 commit dcc6301
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sections/seeds.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ export default [
{
type: "list",
content: [
"`directory`: a relative path to the directory containing the seed files (default `./seeds`)",
"`directory`: a relative path to the directory containing the seed files. Can be an array of paths (default `./seeds`)",
"`loadExtensions`: array of file extensions which knex will treat as seeds. For example, if you have typescript transpiled into javascript in the same folder, you want to execute only javascript seeds. In this case, set `loadExtensions` to `['.js']` (Notice the dot!) (default `['.co', '.coffee', '.eg', '.iced', '.js', '.litcoffee', '.ls', '.ts']`)",
"`specific`: a specific seed file to run from the seeds directory, if its value is `undefined` it will run all the seeds (default `undefined`)"
"`specific`: a specific seed file to run from the seeds directory, if its value is `undefined` it will run all the seeds (default `undefined`)",
"`sortDirsSeparately`: if true and multiple directories are specified, all migrations from a single directory will be executed before executing migrations in the next folder (default `false`)"
]
},
{
Expand All @@ -30,7 +31,7 @@ export default [
type: "method",
method: "make",
example: "knex.seed.make(name, [config])",
description: "Creates a new seed file, with the name of the seed file being added.",
description: "Creates a new seed file, with the name of the seed file being added. If the seed directory config is an array of paths, the seed file will be generated in the latest specified.",
children: [ ]
},
{
Expand Down

0 comments on commit dcc6301

Please sign in to comment.