Skip to content

fix: Database seeding with scoped SQL instance in transactions#1072

Open
tsuvic wants to merge 1 commit into
vercel:mainfrom
tsuvic:patch-1
Open

fix: Database seeding with scoped SQL instance in transactions#1072
tsuvic wants to merge 1 commit into
vercel:mainfrom
tsuvic:patch-1

Conversation

@tsuvic

@tsuvic tsuvic commented Jun 22, 2025

Copy link
Copy Markdown

As noted in several responses on #1022, a 500 error occurred during database seeding.
This was caused by using a global SQL instance within a transaction, which led postgres to detect a transaction boundary violation and throw an error.
To resolve this, each seed function was updated to use a scoped SQL instance tied to the transaction.

@vercel

vercel Bot commented Jun 22, 2025

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-learn-starter ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2025 7:55am
next-seo-starter ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2025 7:55am

@vercel

vercel Bot commented Jun 22, 2025

Copy link
Copy Markdown
Contributor

@tsuvic is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@tsuvic

tsuvic commented Aug 2, 2025

Copy link
Copy Markdown
Author

@leerob I’d appreciate your feedback on this. Thank you!

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