devth
devth
PPrisma
Created by devth on 9/10/2024 in #help-and-questions
Advisory lock errors in CI suddenly ocurring very frequently
I have a newish (about 2 months old) next.js app with prisma deployed on Vercel. Lately I'm getting Error: P1002 on about 75% of my builds, even when there are minutes between builds.
Context: Timed out trying to acquire a postgres advisory lock (SELECT pg_advisory_lock(72707369)). Elapsed: 10000ms. See https://pris.ly/d/migrate-advisory-locking for details.
Context: Timed out trying to acquire a postgres advisory lock (SELECT pg_advisory_lock(72707369)). Elapsed: 10000ms. See https://pris.ly/d/migrate-advisory-locking for details.
I understand the advisory lock, and I don't like the idea of flat out disabling it. Is it possible to only attempt to acquire a lock if there are pending migrations? 99% of the time it has no migrations to run.
1 replies
PPrisma
Created by devth on 8/19/2024 in #help-and-questions
accidental db push
A teammate changed the schema and ran db push on an existing database instead of npx prisma migrate dev. Is there a way to retroactively create a migration that would allow rolling forward without resetting the database? The change was adding a single column - and if we need to drop that column that's fine but I'd like to avoid dropping the entire db.
2 replies