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

Add path pointing to db migrations folder as opts for MapeoManager and MapeoProject #341

Closed
2 tasks
achou11 opened this issue Oct 19, 2023 · 0 comments · Fixed by #384
Closed
2 tasks

Add path pointing to db migrations folder as opts for MapeoManager and MapeoProject #341

achou11 opened this issue Oct 19, 2023 · 0 comments · Fixed by #384
Assignees

Comments

@achou11
Copy link
Member

achou11 commented Oct 19, 2023

Description

Currently both MapeoManager and MapeoProject make assumptions about where the drizzle migration folders live:

https://github.com/digidem/mapeo-core-next/blob/110d6d8086c3d2e3cb052482420fa8f8256946db/src/mapeo-project.js#L87-L89

https://github.com/digidem/mapeo-core-next/blob/110d6d8086c3d2e3cb052482420fa8f8256946db/src/mapeo-manager.js#L68-L70

This generally is fine with our setup where where we publish the folders as part of the module, but becomes more problematic in cases where bundling is used (as we do on mobile app). To provide more flexibility, we should make these paths constructor opts that are specified for each class, that way the consumer can fully decide where these migration folders live in their application.

MapeoManager will require an opt for each db e.g. clientMigrationPath and projectMigrationPath while MapeoProject just needs one for the project db e.g. projectMigrationPath.

Tasks

  • Add constructor opts for client migration and project migration folders for MapeoManager
  • Add constructor opt for project migration folder for MapeoProject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants