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

Upgrade Blitz.js and Prisma #25

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Upgrade Blitz.js and Prisma #25

wants to merge 1 commit into from

Conversation

Fralez
Copy link
Contributor

@Fralez Fralez commented Jan 29, 2021

  • Blitz.js 0.27.1 -> 0.29.7
  • Prisma ~2.12 -> 2.15.0
  • Updated prisma migrate
  • Modified prisma-test-environment to match new breaking changes
  • Fix some broken pieces of code after upgrade

WARNING: This PR may break the Production database if merged and deployed.
In order to avoid this, we must baseline our Production environment. This isn't done yet, I'll update when this is finished.

TO DOs

  • Baseline the Production environment
  • Upgrade Blitz.js to 0.30.0-canary.2

- Blitz.js 0.27.1 -> 0.29.7
- Prisma ~2.12 -> 2.15.0
- Updated `prisma migrate`
- Modified `prisma-test-environment` to match new breaking changes
- Fix some broken pieces of code after upgrade
@vercel
Copy link

vercel bot commented Jan 29, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/ingenious-agency/mensaje/5sft4792b
✅ Preview: Canceled

@Fralez Fralez self-assigned this Jan 29, 2021
@@ -17,8 +17,11 @@ async function createReaction({ data }: CreateReactionInput, ctx: Ctx) {
})
if (existingReaction) return existingReaction

// Add the user connection to data
data.user = { connect: { id: ctx.session.userId } }
Copy link

Choose a reason for hiding this comment

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

Why this instead of spreading? Just curious...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know exactly why, but when the spreading is used, the ide throws a types error. I suspect that something new about blitz + spreading data onto a non typed object makes typescript confused, but I got surprised of this too.
image

Copy link

Choose a reason for hiding this comment

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

Spookie 👻

Copy link

@cherta cherta left a comment

Choose a reason for hiding this comment

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

This looks great @Fralez! I think we should backup our DB and deploy after-hours so we don't impact, but it seems this should work.

Great work in this PR btw 👏

@cherta cherta linked an issue Jan 29, 2021 that may be closed by this pull request
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.

Upgrade Blitz
2 participants