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

database migrations using Prisma Migration engines #158

Merged
merged 4 commits into from
Sep 15, 2022
Merged

Conversation

oscartbeaumont
Copy link
Collaborator

@oscartbeaumont oscartbeaumont commented Sep 12, 2022

Notes:

  • The _migration_connector() function doesn't support MongoDB currently.
  • Nothing is feature gated by database connector
  • If the "migrations" feature is enabled on the CLI and not runtime it will fail to compile. Hence CI issue with integration tests.

I am sure you will probs do a bunch of changes but this is just a starting place for official support for database migrations.

  • Schema path should be resolved from CLI's --schema args

@oscartbeaumont
Copy link
Collaborator Author

Also, Clippy reported to change the following in Spacedrive:

  • we should Box<NewClientError> cause its big
  • change ConnectionInfo::from_url(&db_url) to ConnectionInfo::from_url(db_url)

@oscartbeaumont
Copy link
Collaborator Author

image
It's probally worth documenting or referencing to baselining in your docs about the migration feature. I ran across this with Spacedrive when jumping between branches.

cli/src/generator/header.rs Show resolved Hide resolved
@Brendonovich Brendonovich marked this pull request as ready for review September 15, 2022 19:32
@Brendonovich Brendonovich merged commit b1bd873 into 0.6.2 Sep 15, 2022
@Brendonovich
Copy link
Owner

Going to merge this for now and address baselining later. May not even implement it till a future release.

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.

Expose migration engine with some utility functions
2 participants