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

Storage and Schema Migration Combo Test #6690

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tsekiguchi
Copy link

This PR contains:

A failing test that incorporates both storage migration and schema migration.

Describe the problem you have without this PR

Updating schema in between storage migrations without updating the version numbers is currently allowed behavior.

Then, when trying to then implement a normal schema migration strategy afterwards, the migration strategy starts throwing error unknown migration error, DM4.

// this is where the test error occurs
const v1collection = await db_newStorage_schemav1.addCollections({
    mycollection: {
        schema: mySchemaV1,
        migrationStrategies: {
            1: (d) => d,
        },
    },
});

I tried to see if getOldCollectionsMeta() was potentially causing this, but it wasn't returning anything in this context.

Todos

  • Tests
  • Documentation
  • Typings
  • Changelog

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.

1 participant