-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
test(cli): e2e migrations for D1 #24214
Conversation
size-limit report 📦
|
CodSpeed Performance ReportMerging #24214 will not alter performanceComparing Summary
|
… TypeScript, no failure in Rust
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull request |
…rations-93d288241fddb3768c310aeceb6b0120145c6f6d
…migrations-93d288241fddb3768c310aeceb6b0120145c6f6d' into feat/d1-migrations-tests
Note: the base branch needs to be changed later |
Yep, I was waiting for the engines to compile, so you could see the list of green marks on the CI :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
The tests in general are really long because they intend to test end to end.
For some cases it would be nice, especially if we want to add more tests later to make them shorter by manually creating an init migration which contains all what is needed.
Example: (empty) -> apply init migration which also contains some data -> try to apply the next migration that should fail
Because it's ok to have a couple of long tests for e2e purposes, but it's not easy to maintain if we copy and paste them many times.
This PR adds automated tests for Cloudflare D1 migrations with Prisma https://www.prisma.io/docs/orm/overview/databases/cloudflare-d1#migration-workflows.
It also showcases that #24208 is now fixed via prisma/prisma-engines#4871.
This PR relies on an integration release of prisma/prisma-engines#4871 (currently being built).
Note: It's currently added to the
cli
package because of a previous attempt at usingprisma generate
within the test. Still, since at some point we will addprisma db seed
support for D1, I think we can keep the CLI e2e tests there.