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

feat: Run specific seed file (closes #801) #3335

Merged
merged 2 commits into from Jul 7, 2019

Conversation

felixmosh
Copy link
Contributor

This features allows to run a specific seed file.
It adds an additional cli property --specific=filename.js which points to some seed file in the seed directory.

usage: npx knex seed:run --specific=seed-filename.js

return knex.seed
.run({ directory: 'test/integration/seed/test' })
.then(([data]) => {
expect(path.basename(data[0])).to.equal('seed1.js');
expect(path.basename(data[1])).to.equal('seed2.js');
});
});

it('should run specific seed file in the configured seed directory', () => {
Copy link
Collaborator

@kibertoad kibertoad Jul 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async-await is preferable for new tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@kibertoad
Copy link
Collaborator

Could you please also create documentation pr in knex documentation repo?

@felixmosh
Copy link
Contributor Author

Could you please also create documentation pr in knex documentation repo?

I've added the additional "sections" in the documentation, but when run dev / build and serving the docs, I don't see the additions even though I do see the additions in the source code of the html.

Any help?

@felixmosh
Copy link
Contributor Author

Ok, managed to fix the issue, apparently there is mssql deps without it to be in package.json.

Added: knex/documentation#213

@kibertoad kibertoad merged commit 8b31a43 into knex:master Jul 7, 2019
@kibertoad
Copy link
Collaborator

Thank you!

felixmosh added a commit to felixmosh/knex that referenced this pull request Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants