Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kieckhafer
Copy link
Member

@kieckhafer kieckhafer commented Jan 24, 2019

Impact: minor
Type: bugfix

Issue

Migration 56 is throwing an error, Error while migrating TypeError: Cannot read property 'namedContext' of null. It seems this error stems from the issue of having two different schemas for variant and simple, causing the issue with the update.

There are various cases of this same error reported in github issues:
Meteor-Community-Packages/meteor-collection2#310
aldeed/meteor-collection2-core#12

Solution

Split the update into two different database calls.

Breaking changes

None

Testing

  1. Start reaction from a fresh install
  2. See all migrations worked

@aldeed
Copy link
Contributor

aldeed commented Jan 24, 2019

@kieckhafer I would instead fix by adding bypassCollection2: true option to all of the update calls. If you look at other migrations, they do this. It's important to do this for all migrations anyway because if the schema ever changes, we do NOT want these updates to fail based on not matching the new schema. They should always and forever do the same thing because presumably there will be a later migration that handles the later schema change.

Sorry I didn't catch this when reviewing

Copy link
Contributor

@aldeed aldeed left a comment

Choose a reason for hiding this comment

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

See my comment

@kieckhafer
Copy link
Member Author

@aldeed updated

@aldeed aldeed merged commit 6d472c5 into develop Jan 24, 2019
@aldeed aldeed deleted the fix-kieckhafer-migration56 branch January 24, 2019 23:09
@kieckhafer kieckhafer removed the request for review from dancastellon January 24, 2019 23:52
@jeffcorpuz jeffcorpuz mentioned this pull request Mar 1, 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.

3 participants