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

Apply postprocessing in migrations #2934

Merged
merged 6 commits into from Dec 3, 2018
Merged

Apply postprocessing in migrations #2934

merged 6 commits into from Dec 3, 2018

Conversation

@kibertoad
Copy link
Collaborator

@kibertoad kibertoad commented Nov 29, 2018

No description provided.

@kibertoad kibertoad requested a review from elhigu Nov 29, 2018
@kibertoad
Copy link
Collaborator Author

@kibertoad kibertoad commented Nov 29, 2018

huh, I have no idea why this is not failing, it used to locally.

_.isEmpty(updates) &&
typeof this.single.update !== 'function'
) {
if (_.isEmpty(updates) && typeof this.single.update !== 'function') {

This comment has been minimized.

@kibertoad

kibertoad Nov 29, 2018
Author Collaborator

prettier picked this one up for some reason

@@ -54,6 +54,26 @@ function initContext(knexFn) {
return this.client.ref(ref);
},

disableProcessing() {

This comment has been minimized.

@elhigu

elhigu Dec 3, 2018
Member

Would be good to add some comment that these should not be added documentation to be a part to knex public API before we have designed better API names and parameters for this.

This comment has been minimized.

@elhigu

elhigu Dec 3, 2018
Member

And also to mention why these exist (that it was needed for migrations to be able to run those internal queries, with consistent identifier naming).

connection: ':memory:',
migrationSource,
postProcessResponse: () => {
done();

This comment has been minimized.

@elhigu

elhigu Dec 3, 2018
Member

This test actually calls done, before execution of migrations has ended. Because that is separate inmemory database, it probably won't cause any problems. Except test might have been ended already before the expectation below has finished execution.

@elhigu
elhigu approved these changes Dec 3, 2018
Copy link
Member

@elhigu elhigu left a comment

Looks like a suitable hack to have this issue fixed for now 👍Just some minor comments about underlining it better for others reading the code that this is not meant to be perfect solution forever and that it is just fine to modify this to be something more elegant at some point.

@kibertoad kibertoad changed the title Failing test for response postprocessing in migrations Apply postprocessing in migrations Dec 3, 2018
@kibertoad kibertoad merged commit 1cd1f07 into master Dec 3, 2018
3 checks passed
3 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.006%) to 84.996%
Details
@kibertoad kibertoad deleted the fix/postprocess-migrations branch Dec 3, 2018
mwilliammyers added a commit to voxjar/knex that referenced this pull request Dec 12, 2018
Apply postprocessing in migrations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants